From 6eb8d255d217c7f0ed2a89e75ae5cb14653c64eb Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sat, 2 Oct 1999 21:33:33 +0000 Subject: 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). --- src/backend/commands/indexcmds.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/backend/commands/indexcmds.c') 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: -- cgit v1.2.3