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

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

From
petere@svr1.postgresql.org (Peter Eisentraut - PostgreSQL)
Date:
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.


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

From
Tom Lane
Date:
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

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

From
Peter Eisentraut
Date:
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