Re: [HACKERS] PL/pgSQL - for discussion (ELOG)

Andreas Zeugswetter <andreas.zeugswetter@telecom.at>

From: Zeugswetter Andreas <andreas.zeugswetter@telecom.at>
To: "'pgsql-hackers@hub.org'" <pgsql-hackers@hub.org>
Date: 1998-03-13T10:03:12Z
Lists: pgsql-hackers
>>             As indicated above there is an ELOG  statement  that  can
>>             throw messages into the PostgreSQL elog mechanism.
>> 
>>                 ELOG level 'format' [identifiers];
>                  ^^^^^^^^^^
>NO, pls - too postgres-ish! Just let ABORT to have 'format' etc and add 
>PRINT (or something like this) to put some messages to application (via NOTICE).
>What are used in Oracle, Sybase etc here ?

Yes I was going to comment on this too:
Informix:	raise exception -273,0,'You are not user administrator.';  --or
		raise exception -100;
Oracle:		raise program_error; -- where program_error is one of many Orcl predefined error numbers

I think we will need error numbers in the future that map directly to some text.
This would also help Michael with the ESQL/C preprocessor.

Andreas