From: | Lorusso Domenico <domenico(dot)l76(at)gmail(dot)com> |
---|---|
To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
Cc: | pgsql-docs(at)lists(dot)postgresql(dot)org |
Subject: | Re: pass open cursor via USING in execute staement |
Date: | 2023-06-01 16:41:56 |
Message-ID: | CAJMpnG6dt+nA_v+Upzpf4+ccbUhbiQGaQjXSqfDupDF-MfpzmQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Yes, I agree, but also in cursor page.
Talking about cursor I can't find example that shows how pass a bounded
cursor to a function or procedure (must be already open? must be declared
in some specific way?)
Il giorno gio 1 giu 2023 alle ore 16:23 Laurenz Albe <
laurenz(dot)albe(at)cybertec(dot)at> ha scritto:
> On Wed, 2023-05-31 at 22:57 +0000, PG Doc comments form wrote:
> > Page: https://www.postgresql.org/docs/15/plpgsql-statements.html
> >
> > Should be documented if this statement is allowed or not (if not, maybe
> set
> > as desired feature :-) )
> >
> > EXECUTE format('update %I set col1=$1, col2=now() WHERE current of $3',
> > tabname)
> > USING myVal, myOpenCursor;
>
> That is not supported. Parameters can only be used in a place where
> constants
> (SQL literals) might appear, not instead of identifiers (names of tables,
> columns etc.)
>
> I looked, and that is really not documented anywhere.
> One of PREPARE or the extended query protocol might be good places.
>
> Yours,
> Laurenz Albe
>
--
Domenico L.
per stupire mezz'ora basta un libro di storia,
io cercai di imparare la Treccani a memoria... [F.d.A.]
From | Date | Subject | |
---|---|---|---|
Next Message | yanliang lei | 2023-06-04 15:04:02 | pg data type bool is the boolean ,but in the documents there is no description about " bool is equal to boolean” |
Previous Message | Laurenz Albe | 2023-06-01 14:23:44 | Re: pass open cursor via USING in execute staement |