From: | "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
---|---|
To: | <leif(at)crysberg(dot)dk> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Invalid statement name (null) in line ## - what am I doing wrong ? |
Date: | 2009-06-19 14:07:18 |
Message-ID: | D960CB61B694CF459DCFB4B0128514C202FF6663@exadv11.host.magwien.gv.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
leif wrote:
> Thank you for precise answer. And yes, I have (at least) 2
> connections, all named. So I am even not using the 'default'
> connection prepared statement as you point out.
>
> I have looked a little further into the output of ecpg as
> well as adding the "AT <connection>" to my statements. Adding
> the "AT" to the prepare statement seems to have fixed the
> named error :-). However, after that I'm not able to compile
> my stuff on the 8.2 installation. Is there a way to 'detect'
> (using #if .... ) whether I am using 8.2 or 8.3+ ?
You could #include <pg_config.h> and check PG_VERSION_NUM.
> I also tried to put the "AT <connection>" on the the
> ALLOCATE/DEALLOCATE DESCRIPTOR statements, which was accepted
> for the ALLOCATE, but gave an error for the DEALLOCATE. I can
> see in the ecpg output that the "AT" is not (yet?) used for
> these statements, so I guess that it is ok to leave them as is?
I tend to agree; I'd say that descriptors are not associated with
connections, they are something that "lives" on the client side.
But I don't know for certain.
I would say that you should leave them without AT, but it is
weird that ALLOCATE lets you use AT without complaining.
> Are all this documented somewhere ?
The documentation seems to be a bit vague on these things...
Looking at the C output and the source helps...
Yours,
Laurenz Albe
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce YUAN | 2009-06-19 14:26:34 | Re: How to use PQfn() in libpq library? |
Previous Message | Tom Lane | 2009-06-19 14:00:44 | Re: How to use PQfn() in libpq library? |