1
0
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:
Bruce Momjian
1998-10-02 16:23:07 +00:00
parent 772a596ed2
commit 9b21a18cee
3 changed files with 39 additions and 5 deletions

View File

@@ -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;
/*