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

From: leif(at)crysberg(dot)dk
To: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Invalid statement name (null) in line ## - what am I doing wrong ?
Date: 2009-06-19 18:42:59
Message-ID: 14495216.77831245436979163.JavaMail.root@quick
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi again,

Will do. Thanks again,

Leif

----- "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:

> 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.

Ah, yes.
>
> > 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...

The "real" documentation ;-)

>
> Yours,
> Laurenz Albe

Browse pgsql-general by date

  From Date Subject
Next Message Miguel Miranda 2009-06-19 20:32:16 Disaster recovery (server died)
Previous Message Ivan Sergio Borgonovo 2009-06-19 18:23:20 looping over a small record set over and over in a function