OSDN Git Service

Allow DECLARE CURSOR to take parameters from the portal in which it is
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 2 Aug 2004 01:30:51 +0000 (01:30 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 2 Aug 2004 01:30:51 +0000 (01:30 +0000)
commitf622c5404905cb998adabe3a3527f7e9cdace229
treebc65d3f7d71a9a8c09945e7072bbca2baeb937a3
parent410b1dfb885f5b6d60f89003baba32a4efe93225
Allow DECLARE CURSOR to take parameters from the portal in which it is
executed.  Previously, the DECLARE would succeed but subsequent FETCHes
would fail since the parameter values supplied to DECLARE were not
propagated to the portal created for the cursor.
In support of this, add type Oids to ParamListInfo entries, which seems
like a good idea anyway since code that extracts a value can double-check
that it got the type of value it was expecting.
Oliver Jowett, with minor editorialization by Tom Lane.
18 files changed:
src/backend/commands/portalcmds.c
src/backend/commands/prepare.c
src/backend/commands/schemacmds.c
src/backend/executor/execQual.c
src/backend/executor/functions.c
src/backend/executor/spi.c
src/backend/nodes/Makefile
src/backend/nodes/params.c [new file with mode: 0644]
src/backend/optimizer/util/clauses.c
src/backend/tcop/postgres.c
src/backend/tcop/pquery.c
src/backend/tcop/utility.c
src/include/commands/portalcmds.h
src/include/nodes/params.h
src/include/tcop/utility.h
src/pl/plpgsql/src/pl_exec.c
src/test/regress/expected/portals.out
src/test/regress/sql/portals.sql