mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
the following little patch adds array references to query
parameters. With it applied a function like
CREATE FUNCTION getname(oid8, int4) RETURNS name AS
'SELECT typname FROM pg_type WHERE oid = $1[$2]'
LANGUAGE 'sql';
is possible. Mainly I need this to enable array references in
expressions for PL/pgSQL. Complete regression test ran O.K.
Jan
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: parsenodes.h,v 1.59 1998/09/01 04:36:43 momjian Exp $
|
||||
* $Id: parsenodes.h,v 1.60 1998/10/02 16:23:07 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -667,6 +667,7 @@ typedef struct ParamNo
|
||||
NodeTag type;
|
||||
int number; /* the number of the parameter */
|
||||
TypeName *typename; /* the typecast */
|
||||
List *indirection; /* array references */
|
||||
} ParamNo;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user