# ext/pgsql build broken

- Thread: https://externals.io/message/15503
- Original archive: https://news-web.php.net/php.internals/15503
- Started by Jani Taskinen on 2005-03-19T21:21:26+00:00
- Messages: 6
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #15503 — Jani Taskinen — 2005-03-19T21:21:26+00:00

URL: https://externals.io/message/15503#15503

Compile fails now with ext/pgsql after your commits:

/usr/src/php5/ext/pgsql/pgsql.c: In function `zm_startup_pgsql':
/usr/src/php5/ext/pgsql/pgsql.c:494: error: `PG_DIAG_INTERNAL_POSITION' undeclared (first use in this function)
/usr/src/php5/ext/pgsql/pgsql.c:494: error: (Each undeclared identifier is reported only once
/usr/src/php5/ext/pgsql/pgsql.c:494: error: for each function it appears in.)
/usr/src/php5/ext/pgsql/pgsql.c:495: error: `PG_DIAG_INTERNAL_QUERY' undeclared (first use in this function)
/usr/src/php5/ext/pgsql/pgsql.c: In function `zif_pg_result_error_field':
/usr/src/php5/ext/pgsql/pgsql.c:3488: error: `PG_DIAG_INTERNAL_POSITION' undeclared (first use in this function)
/usr/src/php5/ext/pgsql/pgsql.c:3488: error: `PG_DIAG_INTERNAL_QUERY' undeclared (first use in this function)
make: *** [ext/pgsql/pgsql.lo] Error 1

     Please fix ASAP.

     --Jani

---

## #15505 — Christopher Kings-Lynne — 2005-03-20T01:54:44+00:00

URL: https://externals.io/message/15503#15505 · In reply to: #15503

Sorry, just woke up...

>     Compile fails now with ext/pgsql after your commits:
> 
> /usr/src/php5/ext/pgsql/pgsql.c: In function `zm_startup_pgsql':
> /usr/src/php5/ext/pgsql/pgsql.c:494: error: `PG_DIAG_INTERNAL_POSITION' 
> undeclared (first use in this function)
> /usr/src/php5/ext/pgsql/pgsql.c:494: error: (Each undeclared identifier 
> is reported only once
> /usr/src/php5/ext/pgsql/pgsql.c:494: error: for each function it appears 
> in.)
> /usr/src/php5/ext/pgsql/pgsql.c:495: error: `PG_DIAG_INTERNAL_QUERY' 
> undeclared (first use in this function)
> /usr/src/php5/ext/pgsql/pgsql.c: In function `zif_pg_result_error_field':
> /usr/src/php5/ext/pgsql/pgsql.c:3488: error: `PG_DIAG_INTERNAL_POSITION' 
> undeclared (first use in this function)
> /usr/src/php5/ext/pgsql/pgsql.c:3488: error: `PG_DIAG_INTERNAL_QUERY' 
> undeclared (first use in this function)
> make: *** [ext/pgsql/pgsql.lo] Error 1

Is that all the failure messages?  I cannot understand why 2 of the 12 
diagnostic codes are not defined and the others are, given that they 
were all added in one go in PostgreSQL 7.4??

What version of PostgreSQL libpq are you linking against?

Also, is this before or after I added the #if HAVE_PQRESULTERRORFIELD on 
line 486 of pgsql.c?

Do these #defines appear in your include dir in postgres_ext.h on your 
system?

Chris

---

## #15506 — Jani Taskinen — 2005-03-20T02:13:43+00:00

URL: https://externals.io/message/15503#15506 · In reply to: #15505

> > […]
>
> Is that all the failure messages?  I cannot understand why 2 of the 12 
> diagnostic codes are not defined and the others are, given that they were all 
> added in one go in PostgreSQL 7.4??

     Yes, that was all.

> What version of PostgreSQL libpq are you linking against?

     7.4.7 (from the fedora core 3 rpms)

> Also, is this before or after I added the #if HAVE_PQRESULTERRORFIELD on line 
> 486 of pgsql.c?

     After. I didn't try compiling before. :)

> Do these #defines appear in your include dir in postgres_ext.h on your system?

     No. Here's the whole section from it:

     #define PG_DIAG_SEVERITY                'S'
     #define PG_DIAG_SQLSTATE                'C'
     #define PG_DIAG_MESSAGE_PRIMARY         'M'
     #define PG_DIAG_MESSAGE_DETAIL          'D'
     #define PG_DIAG_MESSAGE_HINT            'H'
     #define PG_DIAG_STATEMENT_POSITION      'P'
     #define PG_DIAG_CONTEXT                 'W'
     #define PG_DIAG_SOURCE_FILE             'F'
     #define PG_DIAG_SOURCE_LINE             'L'
     #define PG_DIAG_SOURCE_FUNCTION         'R'

     --Jani

---

## #15507 — Christopher Kings-Lynne — 2005-03-20T02:27:00+00:00

URL: https://externals.io/message/15503#15507 · In reply to: #15506

>     No. Here's the whole section from it:
> 
>     #define PG_DIAG_SEVERITY                'S'
>     #define PG_DIAG_SQLSTATE                'C'
>     #define PG_DIAG_MESSAGE_PRIMARY         'M'
>     #define PG_DIAG_MESSAGE_DETAIL          'D'
>     #define PG_DIAG_MESSAGE_HINT            'H'
>     #define PG_DIAG_STATEMENT_POSITION      'P'
>     #define PG_DIAG_CONTEXT                 'W'
>     #define PG_DIAG_SOURCE_FILE             'F'
>     #define PG_DIAG_SOURCE_LINE             'L'
>     #define PG_DIAG_SOURCE_FUNCTION         'R'

Hmmmm.  Maybe the failing ones were added in 8.0...  Let me check...

Chris

---

## #15508 — Christopher Kings-Lynne — 2005-03-20T02:46:30+00:00

URL: https://externals.io/message/15503#15508 · In reply to: #15507

OK, fixed.  Please test it.

I'll be out for an hour or two...

Christopher Kings-Lynne wrote:
> > […]
> 
> 
> Hmmmm.  Maybe the failing ones were added in 8.0...  Let me check...
> 
> Chris

---

## #15509 — Jani Taskinen — 2005-03-20T02:58:27+00:00

URL: https://externals.io/message/15503#15509 · In reply to: #15508

Yeah, compiles now. I fixed a small error in your fix
     though. :)

     --Jani




> OK, fixed.  Please test it.
>
> I'll be out for an hour or two...
>
> Christopher Kings-Lynne wrote:
> > […]
