Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> Does Oracle support GET DIAGNOSTICS? If so, couldn't we just use that?
> I can't see what good will become of making any slightly useful
> information become available as magic variables of some kind.
Oracle actually defines these things as parameterless functions that are
called without parentheses (like CURRENT_USER). "Magic variables" are
about as close as we can get to matching that.
If we go with the idea that they should be local to blocks containing
EXCEPTION, then the easiest implementation would involve pushing them
into the namespace at the beginning of processing the EXCEPTION clause;
which'd mean they are actually physically inaccessible anywhere outside
EXCEPTION. That seems like a suitably narrow API --- in fact it
completely gets rid of the question of what their initial/default values
should be. I think we can mark 'em CONST, too, so that they are truly
semantically indistinguishable from functions.
regards, tom lane
In response to
pgsql-committers by date
|Next:||From: Bruce Momjian||Date: 2005-05-26 15:26:00|
|Subject: pgsql: Back out: Display only 9 not 10 digits of precision for |
|Previous:||From: Pavel Stehule||Date: 2005-05-26 07:19:51|
|Subject: Re: pgsql: Add PL/pgSQL SQLSTATE and SQLERRM support|
pgsql-patches by date
|Next:||From: Neil Conway||Date: 2005-05-26 14:15:07|
|Subject: Re: O_DIRECT for WAL writes|
|Previous:||From: a_ogawa||Date: 2005-05-26 14:01:37|
|Subject: Re: wchareq improvement|