diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-03-10 03:53:52 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-03-10 03:53:52 +0000 |
commit | aa83bc04e089e13f2746ba55720e5993268c46f5 (patch) | |
tree | 1b5c0082e22385789d3581792af4e1a823f835ba /src/include/nodes/nodes.h | |
parent | b9e8ffcd5d1a3d45b2f697ea944931f56367c86b (diff) | |
download | postgresql-aa83bc04e089e13f2746ba55720e5993268c46f5.tar.gz postgresql-aa83bc04e089e13f2746ba55720e5993268c46f5.zip |
Restructure parsetree representation of DECLARE CURSOR: now it's a
utility statement (DeclareCursorStmt) with a SELECT query dangling from
it, rather than a SELECT query with a few unusual fields in it. Add
code to determine whether a planned query can safely be run backwards.
If DECLARE CURSOR specifies SCROLL, ensure that the plan can be run
backwards by adding a Materialize plan node if it can't. Without SCROLL,
you get an error if you try to fetch backwards from a cursor that can't
handle it. (There is still some discussion about what the exact
behavior should be, but this is necessary infrastructure in any case.)
Along the way, make EXPLAIN DECLARE CURSOR work.
Diffstat (limited to 'src/include/nodes/nodes.h')
-rw-r--r-- | src/include/nodes/nodes.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index 356f4b60fa3..3304ea89e4e 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: nodes.h,v 1.137 2003/02/16 02:30:39 tgl Exp $ + * $Id: nodes.h,v 1.138 2003/03/10 03:53:51 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -248,6 +248,7 @@ typedef enum NodeTag T_PrepareStmt, T_ExecuteStmt, T_DeallocateStmt, + T_DeclareCursorStmt, T_A_Expr = 800, T_ColumnRef, |