Return-Path: owner-postman Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id GAA25667 for postgres-redist; Thu, 8 Dec 1994 06:34:59 -0800 Resent-From: POSTGRES mailing list Resent-Message-Id: <199412081434.GAA25667@nobozo.CS.Berkeley.EDU> X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol Sender: owner-postman@postgres.Berkeley.EDU X-Return-Path: owner-postman Received: from fermat.Mayo.EDU (fermat.mayo.edu [129.176.212.7]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id GAA25657 for ; Thu, 8 Dec 1994 06:34:57 -0800 Received: by fermat.Mayo.EDU (5.57/Ultrix2.4-C) id AA21131; Thu, 8 Dec 94 08:34:25 -0600 Received: by hercules.mayo.edu (931110.SGI/) (for postgres@nobozo.cs.berkeley.edu) id AA18113; Thu, 8 Dec 94 08:29:29 -0600 Date: Thu, 8 Dec 94 08:29:29 -0600 From: Glen Niebur Message-Id: <9412081429.AA18113@hercules.mayo.edu> To: postgres@postgres.Berkeley.EDU Subject: Multiple set attributes in append Resent-To: postgres-redist@postgres.Berkeley.EDU Resent-Date: Thu, 08 Dec 94 06:34:59 -0800 Resent-XMts: smtp As promised, here is a diff to the pg_proc.c file which I applied to allow multiple set valued attributes to be inserted in a single query. I have not run the regressions since I changed this, but have seen no ill effects in my work. For those who missed the original question, appends of the form: append lines ( p1="retrieve (points.all ) where points.id=1, p2="retrieve ( points.all ) where points.id=2" ) \g fail with the error ProcedureDefine: Procedure zyxset already exists with the same arguments. Below is a diff for build/src/backend/catalog/pg_proc.c -------8<---------------8<----------8<--------------8<-------------------8< *** /usr/postgres/build/src/backend/catalog/pg_proc.c Fri Aug 26 08:28:01 1994 --- pg_proc.c Tue Nov 29 21:37:11 1994 *************** *** 122,140 **** typev[parameterCount++] = toid; } ! tup = SearchSysCacheTuple(PRONAME, (char *) procedureName, (char *) UInt16GetDatum(parameterCount), (char *) typev, (char *) NULL); ! if (HeapTupleIsValid(tup)) ! elog(WARN, "ProcedureDefine: procedure %s already exists with same arguments", ! procedureName); if (!namestrcmp((char *)languageName, "postquel")) { /* If this call is defining a set, check if the set is already * defined by looking to see whether this call's function text * matches a function already in pg_proc. If so just return the --- 122,143 ---- typev[parameterCount++] = toid; } ! if (namestrcmp((char*)procedureName, GENERICSETNAME)) { ! tup = SearchSysCacheTuple(PRONAME, (char *) procedureName, (char *) UInt16GetDatum(parameterCount), (char *) typev, (char *) NULL); ! if (HeapTupleIsValid(tup)) ! elog(WARN, ! "ProcedureDefine: procedure %s already exists with same arguments", ! procedureName); ! } if (!namestrcmp((char *)languageName, "postquel")) { /* If this call is defining a set, check if the set is already * defined by looking to see whether this call's function text * matches a function already in pg_proc. If so just return the -------8<---------------8<----------8<--------------8<-------------------8< Good luck :-) Glen Glen Niebur | Mayo Clinic | This space intentionally left blank. Biomechanics Lab | gln@hercules.mayo.edu | ============================================================================== To add/remove yourself to/from the POSTGRES mailing list: send mail with the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU". If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and a human will deal with it. DO NOT post to the "postgres" mailing list. ============================================================================== URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/