On May 29, 1:04 pm, [email protected] (Tom Lane) wrote: > Kevin Field <[email protected]> writes: > > default: > > elog(ERROR, "unrecognized raise option: %d", > > opt->opt_type); > > Should this be changed to: > > default: > > ereport(ERROR, (errmsg_internal("unrecognized > > raise option: %d", > > opt->opt_type))); > > No, we generally don't bother with that. The above two are exactly > equivalent and the first is easier to write, so why complicate the code? > ereport is needed if you want to specify a SQLSTATE, provide a > translatable error message, etc, but for internal shouldn't-happen cases > we customarily just use elog.
Ah, I had missed that. I understand. The function's comment's still out of date though, I think, since it uses ereport at the end. -- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
