On Fri, Feb 22, 2002 at 07:57:54PM -0500, Bruce Momjian wrote:
> Tom Lane wrote:
> > Bruce Momjian <pgman@candle.pha.pa.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 foundsomething relevant. Why do you need new name? Maybe use
pglog()if you want 'pg' prefix, or use pgevent() if you meanthat 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 examplePGError(). IMHO upper case has effect for funtions
like"StartSomeImportantMasterProcess()"and not for function that isused on a lot of code lines.
Karel
-- Karel Zak <zakkr@zf.jcu.cz>http://home.zf.jcu.cz/~zakkr/C, PostgreSQL, PHP, WWW, http://docs.linux.cz,
http://mape.jcu.cz