Re: elog() proposal

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: elog() proposal
Date: 2002-02-25 09:26:20
Message-ID: 20020225102620.A21800@zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 22, 2002 at 07:57:54PM -0500, Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > > OK, so elog(ERROR, ...) and PGError(msg, ...) would be the same. Makes
> > > sense. Should we consider hiding these in macros so they really still
> > > call elog(ERROR, ...) for backward compatiblity?
> >
> > I would love to make them macros, but I don't know a portable way to
> > create macros with variable numbers of arguments. Do you feel like
> > writing double parens?
> >
> > PGERROR((msg, ...))
>
> Then we have to wonder what PGError is getting us that elog(ERROR)
> isn't, except the ability to do internationalization based on the first
> parameter.

I still try discover what is bad on elog() and I can't found
something relevant. Why do you need new name? Maybe use
pglog() if you want 'pg' prefix, or use pgevent() if you mean
that not all is "log".

Note about FATALALL: a lot of interpreted languages use "or die".
What use:

elog(DIE, ...).

I don't like upper case in frequent function names, an example
PGError(). IMHO upper case has effect for funtions like
"StartSomeImportantMasterProcess()" and not for function that is
used on a lot of code lines.

Karel

--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/

C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Lummert 2002-02-25 09:56:58 Re: setting up a trace through extended stored procedures
Previous Message Michael Meskes 2002-02-25 07:47:25 Re: [HACKERS] connect with ecpg