Search Postgresql Archives

Re: Invalid statement name (null) in line ## - what am I doing wrong ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux