Re: [HACKERS] PL/pgSQL - for discussion (ELOG) - Mailing list pgsql-hackers

From Zeugswetter Andreas
Subject Re: [HACKERS] PL/pgSQL - for discussion (ELOG)
Date
Msg-id 01BD4E6F.9FF34AA0@pc9358.sd.spardat.at
Whole thread Raw
List 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


pgsql-hackers by date:

Previous
From: jwieck@debis.com (Jan Wieck)
Date:
Subject: Re: [HACKERS] PL/pgSQL - for discussion
Next
From: Zeugswetter Andreas
Date:
Subject: Re: [HACKERS] PL/pgSQL - for discussion (RETURN)