# libpq version

- Thread: https://externals.io/message/15823
- Original archive: https://news-web.php.net/php.internals/15823
- Started by Edin Kadribasic on 2005-04-05T16:22:28+00:00
- Messages: 9
- 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

---

## #15823 — Edin Kadribasic — 2005-04-05T16:22:28+00:00

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

Which version of libpq is required to compile the new pgsql prepare/execute
commands in php 5.1? I'm getting compilation probles with 8.0.0 client lib
where PQprepare() and PQsendPrepare() seem to be missing.

Edin

---

## #15824 — Derick Rethans — 2005-04-05T16:54:54+00:00

URL: https://externals.io/message/15823#15824 · In reply to: #15823

> Which version of libpq is required to compile the new pgsql prepare/execute
> commands in php 5.1? I'm getting compilation probles with 8.0.0 client lib
> where PQprepare() and PQsendPrepare() seem to be missing.

I would suggest to fix this, as there are still plenty of people using 
7.x...

Derick

---

## #15825 — Edin Kadribasic — 2005-04-05T18:43:56+00:00

URL: https://externals.io/message/15823#15825 · In reply to: #15824

Derick Rethans wrote:
> I would suggest to fix this, as there are still plenty of people using 
> 7.x...

This is only relevant on Windows, autoconf takes care of it on unix 
platforms.

Edin

---

## #15838 — Christopher Kings-Lynne — 2005-04-06T01:11:33+00:00

URL: https://externals.io/message/15823#15838 · In reply to: #15823

> Which version of libpq is required to compile the new pgsql prepare/execute
> commands in php 5.1? I'm getting compilation probles with 8.0.0 client lib
> where PQprepare() and PQsendPrepare() seem to be missing.

You required the libpq from PostgreSQL 7.4...

All use of those two functions is protected by autoconf checks, so I 
have no idea what's happening.  It works fine for me on 8.0.2beta.  Care 
to send me more detailed error messages/output?

Chris

---

## #15839 — Christopher Kings-Lynne — 2005-04-06T01:24:56+00:00

URL: https://externals.io/message/15823#15839 · In reply to: #15825

> > […]
> 
> This is only relevant on Windows, autoconf takes care of it on unix 
> platforms.

I strongly suspect that he is not in fact linking against libpq version 
8.  Is ONLY PQprepare and PQsendPrepare missing?  What about the rest?

Gah - Windows.  I'm not able to build on windows...  I just followed the 
existing windows config.w32 which already required PostgreSQL 7.4 or 
above libpq (AFAICT).  The functions I added require 7.4 or above as well.

There is no difference between 7.4 and 8.0's libpq in terms of functions.

Basically before I made any changes, this was in config.w32:

ADD_FLAG("CFLAGS_PGSQL", "/D HAVE_PG_CONFIG_H /D PGSQL_EXPORTS /D 
HAVE_PQSETNONBLOCKING /D HAVE_PQCMDTUPLES /D HAVE_PQCLIENTENCODING /D 
HAVE_PQESCAPE /D HAVE_PQPARAMETERSTATUS /D HAVE_PGTRANSACTIONSTATUS");

Note that that FORCES PQparameterStatus and PQtransactionStatus to be 
assumed to exist.  Both of those functions are PostgreSQL 7.4 only and 
in fact it was Edin himself who added them.  All I did was add a bunch 
more /D's:

ADD_FLAG("CFLAGS_PGSQL", "/D HAVE_PG_CONFIG_H /D PGSQL_EXPORTS /D 
HAVE_PQSETNONBLOCKING /D HAVE_PQCMDTUPLES /D HAVE_PQCLIENTENCODING /D 
HAVE_PQESCAPE /D HAVE_PQPARAMETERSTATUS /D HAVE_PGTRANSACTIONSTATUS /D 
HAVE_PQEXECPARAMS /D HAVE_PQPREPARE /D HAVE_PQEXECPREPARED /D 
HAVE_PQRESULTERRORFIELD /D HAVE_PQSENDQUERYPARAMS /D HAVE_PQSENDPREPARE 
/D HAVE_PQSENDQUERYPREPARED /D HAVE_PQPUTCOPYDATA /D HAVE_PQPUTCOPYEND 
/D HAVE_PQGETCOPYDATA /D HAVE_PQSETERRORVERBOSITY /D HAVE_PQUNESCAPEBYTEA");

However, all those new /D's are also 7.4 only.  So I don't see exactly 
what I did any differently?  If someone wants to make Windows build 
against versions pre-7.4, then I don't know how to do it.  I just 
assumed that whoever came before me knew what they were doing :)

Chris

---

## #15857 — Wez Furlong — 2005-04-06T12:43:24+00:00

URL: https://externals.io/message/15823#15857 · In reply to: #15839

You're not making much sense here; first you say that you think the
errors are because he is not linking against version 8, but then you
say that only version 7.4 or higher is required.

--Wez.

On Apr 5, 2005 9:24 PM, Christopher Kings-Lynne
<chriskl@familyhealth.com.au> wrote:
> > […]
> 
> I strongly suspect that he is not in fact linking against libpq version
> 8.  Is ONLY PQprepare and PQsendPrepare missing?  What about the rest?
> 
> Gah - Windows.  I'm not able to build on windows...  I just followed the
> existing windows config.w32 which already required PostgreSQL 7.4 or
> above libpq (AFAICT).  The functions I added require 7.4 or above as well.
> 
> There is no difference between 7.4 and 8.0's libpq in terms of functions.
> 
> Basically before I made any changes, this was in config.w32:
> 
> ADD_FLAG("CFLAGS_PGSQL", "/D HAVE_PG_CONFIG_H /D PGSQL_EXPORTS /D
> HAVE_PQSETNONBLOCKING /D HAVE_PQCMDTUPLES /D HAVE_PQCLIENTENCODING /D
> HAVE_PQESCAPE /D HAVE_PQPARAMETERSTATUS /D HAVE_PGTRANSACTIONSTATUS");
> 
> Note that that FORCES PQparameterStatus and PQtransactionStatus to be
> assumed to exist.  Both of those functions are PostgreSQL 7.4 only and
> in fact it was Edin himself who added them.  All I did was add a bunch
> more /D's:
> 
> ADD_FLAG("CFLAGS_PGSQL", "/D HAVE_PG_CONFIG_H /D PGSQL_EXPORTS /D
> HAVE_PQSETNONBLOCKING /D HAVE_PQCMDTUPLES /D HAVE_PQCLIENTENCODING /D
> HAVE_PQESCAPE /D HAVE_PQPARAMETERSTATUS /D HAVE_PGTRANSACTIONSTATUS /D
> HAVE_PQEXECPARAMS /D HAVE_PQPREPARE /D HAVE_PQEXECPREPARED /D
> HAVE_PQRESULTERRORFIELD /D HAVE_PQSENDQUERYPARAMS /D HAVE_PQSENDPREPARE
> /D HAVE_PQSENDQUERYPREPARED /D HAVE_PQPUTCOPYDATA /D HAVE_PQPUTCOPYEND
> /D HAVE_PQGETCOPYDATA /D HAVE_PQSETERRORVERBOSITY /D HAVE_PQUNESCAPEBYTEA");
> 
> However, all those new /D's are also 7.4 only.  So I don't see exactly
> what I did any differently?  If someone wants to make Windows build
> against versions pre-7.4, then I don't know how to do it.  I just
> assumed that whoever came before me knew what they were doing :)
> 
> Chris

---

## #15860 — Christopher Kings-Lynne — 2005-04-06T13:17:26+00:00

URL: https://externals.io/message/15823#15860 · In reply to: #15857

> You're not making much sense here; first you say that you think the
> errors are because he is not linking against version 8, but then you
> say that only version 7.4 or higher is required.

As in I suspect (1) he's linking against 7.3 or (2) for some reason the 
libpq 8.0 windows DLL is specifically missing those two functions, which 
exist in the Unix version.

Chris

---

## #15861 — Edin Kadribasic — 2005-04-06T13:32:28+00:00

URL: https://externals.io/message/15823#15861 · In reply to: #15860

OK, I will upgrade the version of libpq on the snaps box. It probably didn't
get updated the last time i upgraded to 8.0.0.

Edin

----- Original Message ----- 
From: "Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
To: "Wez Furlong" <kingwez@gmail.com>
Cc: "Edin Kadribasic" <edink@emini.dk>; "Derick Rethans" <derick@php.net>;
"PHP Internals" <internals@lists.php.net>
Sent: Wednesday, April 06, 2005 3:17 PM
Subject: Re: [PHP-DEV] libpq version


> > […]
>
> As in I suspect (1) he's linking against 7.3 or (2) for some reason the
> libpq 8.0 windows DLL is specifically missing those two functions, which
> exist in the Unix version.
>
> Chris

---

## #15886 — Christopher Kings-Lynne — 2005-04-07T01:52:59+00:00

URL: https://externals.io/message/15823#15886 · In reply to: #15861

> OK, I will upgrade the version of libpq on the snaps box. It probably didn't
> get updated the last time i upgraded to 8.0.0.

The thing is the 7.4 version _should_ work just fine...

Chris
