Thread: PQhost

PQhost

From
Stéphane Pinel
Date:
I have this code :

--------------------------------------------------------
...
char *theHost
...
...
theHost = PQhost(conn);
....

after the PQhost call, "theHost" is unusable, whatever I try, I get a
crash.

I haven't encountered this issue with PQpass, PQuser, PQdb which work
like
a charm.

Any idea ?

Thanks !

------------------------------------------------------------------------
---
Stéphane Pinel
iChat/AIM: s.pinel
------------------------------------------------------------------------
---


Re: PQhost

From
Tom Lane
Date:
Stéphane Pinel <spinel@noos.fr> writes:
> theHost = PQhost(conn);

> after the PQhost call, "theHost" is unusable, whatever I try, I get a  
> crash.

It looks to me like PQhost returns NULL if you are dealing with a local
connection.
        regards, tom lane


Re: PQhost

From
Stéphane Pinel
Date:
Le mercredi, 14 mai 2003, à 19:20 Europe/Paris, Tom Lane a écrit :

> It looks to me like PQhost returns NULL if you are dealing with a local
> connection.
>

Oh yes that's it !

Thanks a lot...

Regards.

------------------------------------------------------------------------
---
Stéphane Pinel
iChat/AIM: s.pinel
------------------------------------------------------------------------
---