diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-10-02 21:33:33 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-10-02 21:33:33 +0000 |
commit | 6eb8d255d217c7f0ed2a89e75ae5cb14653c64eb (patch) | |
tree | a46783f6fd6caf895f23cfc7275472b0d43715f6 /src/backend/commands/indexcmds.c | |
parent | e23a2b1ea02fbbb121048d5f616c397949ebdca8 (diff) | |
download | postgresql-6eb8d255d217c7f0ed2a89e75ae5cb14653c64eb.tar.gz postgresql-6eb8d255d217c7f0ed2a89e75ae5cb14653c64eb.zip |
Allow CREATE FUNCTION's WITH clause to be used for all language types,
not just C, so that ISCACHABLE attribute can be specified for user-defined
functions. Get rid of ParamString node type, which wasn't actually being
generated by gram.y anymore, even though define.c thought that was what
it was getting. Clean up minor bug in dfmgr.c (premature heap_close).
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r-- | src/backend/commands/indexcmds.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index 113854311d6..5f82c2b5321 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.11 1999/09/18 19:06:40 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.12 1999/10/02 21:33:24 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -50,7 +50,7 @@ static char *GetDefaultOpClass(Oid atttypid); * * 'attributeList' is a list of IndexElem specifying either a functional * index or a list of attributes to index on. - * 'parameterList' is a list of ParamString specified in the with clause. + * 'parameterList' is a list of DefElem specified in the with clause. * 'predicate' is the qual specified in the where clause. * 'rangetable' is for the predicate * @@ -116,22 +116,20 @@ DefineIndex(char *heapRelationName, } accessMethodId = tuple->t_data->t_oid; - /* - * Handle parameters [param list is now different (NOT USED, really) - - * ay 10/94] - * * WITH clause reinstated to handle lossy indices. -- JMH, 7/22/96 */ foreach(pl, parameterList) { - ParamString *param = (ParamString *) lfirst(pl); + DefElem *param = (DefElem *) lfirst(pl); - if (!strcasecmp(param->name, "islossy")) + if (!strcasecmp(param->defname, "islossy")) lossy = TRUE; + else + elog(NOTICE, "Unrecognized index attribute '%s' ignored", + param->defname); } - /* * Convert the partial-index predicate from parsetree form to plan * form, so it can be readily evaluated during index creation. Note: |