
> > We could call it TIP or something like that. I think INFO is used
> > because it isn't a NOTICE or ERROR or something major.  It is only INFO.
> > It is neutral information.
> 
> That's what NOTICE is.  NOTICE is only neutral information. NOTICE could
> go to the client by default, whereas if you want something in the server
> log you use LOG.  I doubt an extra level is needed.

SQL92 has WARNING, would that be a suitable addition to NOTICE ?
INFO would not be added since it is like old NOTICE which would stay.
So, instead of introducing a lighter level we would introduce a 
stronger level. (WARNING more important than NOTICE) 
If we change, we might as well adopt some more SQL'ism. 

e.g. string truncation is defined to return SUCCESS with WARNING.

I guess it would be a horror for existing client code though :-(

Andreas

Fri, 1 Mar 2002 12:15:17 +0100
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: elog() patch
Zeugswetter Andreas SB SD wrote:
> 
> > > We could call it TIP or something like that. I think INFO is used
> > > because it isn't a NOTICE or ERROR or something major.  It is only INFO.
> > > It is neutral information.
> > 
> > That's what NOTICE is.  NOTICE is only neutral information. NOTICE could
> > go to the client by default, whereas if you want something in the server
> > log you use LOG.  I doubt an extra level is needed.
> 
> SQL92 has WARNING, would that be a suitable addition to NOTICE ?
> INFO would not be added since it is like old NOTICE which would stay.
> So, instead of introducing a lighter level we would introduce a 
> stronger level. (WARNING more important than NOTICE) 
> If we change, we might as well adopt some more SQL'ism. 
> 
> e.g. string truncation is defined to return SUCCESS with WARNING.
> 
> I guess it would be a horror for existing client code though :-(

That is a good point.  We don't have tons of NOTICE messages, and
WARNING does better describe the new functionality of NOTICE, because
all those informative messages like sequence creation are now doing INFO
instead of NOTICE.

I can make a followup patch to do this.  The current patch doesn't touch
the NOTICE messages that are left alone, so a separate patch makes
sense.  How about WARN as a tag?  Seems shorter than WARNING.  Or maybe
WARNING is fine.   It is just one more letter than NOTICE.

We can keep a NOTICE define for backward compatibility for 7.3, as I
have done with DEBUG.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Fri, 1 Mar 2002 10:15:29 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: elog() patch
Zeugswetter Andreas SB SD wrote:
> 
> > > We could call it TIP or something like that. I think INFO is used
> > > because it isn't a NOTICE or ERROR or something major.  It is only INFO.
> > > It is neutral information.
> > 
> > That's what NOTICE is.  NOTICE is only neutral information. NOTICE could
> > go to the client by default, whereas if you want something in the server
> > log you use LOG.  I doubt an extra level is needed.
> 
> SQL92 has WARNING, would that be a suitable addition to NOTICE ?
> INFO would not be added since it is like old NOTICE which would stay.
> So, instead of introducing a lighter level we would introduce a 
> stronger level. (WARNING more important than NOTICE) 
> If we change, we might as well adopt some more SQL'ism. 
> 
> e.g. string truncation is defined to return SUCCESS with WARNING.
> 
> I guess it would be a horror for existing client code though :-(

Actually, an interesting idea would be to leave NOTICE alone and make
the more serious messages WARNING.  The problem with that is I think
INFO is clearer as something for client/user, and LOG something for the
logs.  I don't think NOTICE has the same conotation.  I just thought I
would mention that possibility.

So, with WARNING, NOTICE would go away and become INFO or WARNING, and
DEBUG goes away to become DEBUG1-5.  With DEBUG gone, our need to add
PG_* to the beginning of the elog symbols may not be necessary.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Fri, 1 Mar 2002 11:42:39 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: elog() patch
Zeugswetter Andreas SB SD writes:

> SQL92 has WARNING, would that be a suitable addition to NOTICE ?
> INFO would not be added since it is like old NOTICE which would stay.
> So, instead of introducing a lighter level we would introduce a
> stronger level. (WARNING more important than NOTICE)
> If we change, we might as well adopt some more SQL'ism.

At the client side SQL knows two levels, namely a "completion condition"
and an "exception condition".  In the PostgreSQL client protocol, these
are distinguished as N and E message packets.  The tags of the messages
are irrelevant, they just serve as a guide to the user reading the
message.

-- 
Peter Eisentraut   peter_e@gmx.net


Fri, 1 Mar 2002 12:09:56 -0500 (EST)
Peter Eisentraut <peter_e@gmx.net>
Re: elog() patch
Peter Eisentraut wrote:
> Zeugswetter Andreas SB SD writes:
> 
> > SQL92 has WARNING, would that be a suitable addition to NOTICE ?
> > INFO would not be added since it is like old NOTICE which would stay.
> > So, instead of introducing a lighter level we would introduce a
> > stronger level. (WARNING more important than NOTICE)
> > If we change, we might as well adopt some more SQL'ism.
> 
> At the client side SQL knows two levels, namely a "completion condition"
> and an "exception condition".  In the PostgreSQL client protocol, these
> are distinguished as N and E message packets.  The tags of the messages
> are irrelevant, they just serve as a guide to the user reading the
> message.

Yes, both INFO and NOTICE/WARNING will come to the client as N.  Only
the message tags will be different.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Fri, 1 Mar 2002 13:09:35 -0500 (EST)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: elog() patch