pgsql-server/ oc/src/sgml/libpq.sgml rc/interf ...

Started by Peter Eisentrautalmost 23 years ago3 messagescomitters
Jump to latest
#1Peter Eisentraut
peter_e@gmx.net

CVSROOT: /cvsroot
Module name: pgsql-server
Changes by: petere@svr1.postgresql.org 03/08/24 15:36:38

Modified files:
doc/src/sgml : libpq.sgml
src/interfaces/ecpg/ecpglib: connect.c error.c
src/interfaces/libpq: libpq-fe.h

Log message:
Add macros for error result fields to libpq.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Peter Eisentraut (#1)
Re: pgsql-server/ oc/src/sgml/libpq.sgml rc/interf ...

petere@svr1.postgresql.org (Peter Eisentraut - PostgreSQL) writes:

Modified files:
doc/src/sgml : libpq.sgml
src/interfaces/ecpg/ecpglib: connect.c error.c
src/interfaces/libpq: libpq-fe.h

Log message:
Add macros for error result fields to libpq.

libpq has several internal uses of the error-field codes that perhaps
ought to be converted to use these macros, eg, pqInternalNotice(),
pqGetErrorNotice2(), pqGetErrorNotice3().

More generally, is libpq the right place to declare these? Shouldn't
we instead put 'em in postgres_ext.h, and teach the backend code to use
'em too?

regards, tom lane

#3Peter Eisentraut
peter_e@gmx.net
In reply to: Tom Lane (#2)
Re: pgsql-server/ oc/src/sgml/libpq.sgml rc/interf ...

Tom Lane writes:

libpq has several internal uses of the error-field codes that perhaps
ought to be converted to use these macros, eg, pqInternalNotice(),
pqGetErrorNotice2(), pqGetErrorNotice3().

More generally, is libpq the right place to declare these? Shouldn't
we instead put 'em in postgres_ext.h, and teach the backend code to use
'em too?

Yes, I'll take care of these two items.

--
Peter Eisentraut peter_e@gmx.net