Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id B7C594759BD for ; Tue, 4 Jun 2002 18:03:29 -0400 (EDT) Received: from kenny.devdomain.com (a213-22-140-120.netcabo.pt [213.22.140.120]) by postgresql.org (Postfix) with ESMTP id 9D01B475476 for ; Tue, 4 Jun 2002 18:02:54 -0400 (EDT) Received: from voodoo (unknown [192.168.10.254]) by kenny.devdomain.com (Postfix) with SMTP id 786A7403C for ; Tue, 4 Jun 2002 23:09:25 +0100 (WEST) Message-ID: <034601c20c13$755ce790$1601a8c0@devdomain.com> From: "Rui Pacheco" To: Subject: Some problems with (my?) PlSQL Date: Tue, 4 Jun 2002 23:02:01 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Archive-Number: 200206/32 X-Sequence-Number: 7997 Hi, I'm getting quite impressed with postgresql, but in the other end quite disappointed with plpgsql... I've been working successfully with postgresql 7.1.2, but I cannot use my actual plpgsql in 7.2.1 (details bellow). I wonder if there is already support for returning a rowset directly (without that return cursor pointer workaround)? Thanks in advance. Rui Parser error with many arguments: ----- example code: DROP FUNCTION devUsersUpdate (INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR); CREATE FUNCTION devUsersUpdate (INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR) RETURNS INTEGER AS ' DECLARE intId ALIAS FOR $1; strLogin ALIAS FOR $2; strPassword ALIAS FOR $3; strEmail ALIAS FOR $4; strTitle ALIAS FOR $5; strFirstName ALIAS FOR $6; strLastName ALIAS FOR $7; strDateCreation ALIAS FOR $8; strDateLastAccess ALIAS FOR $9; strAccLocked ALIAS FOR $10; strAccDisabled ALIAS FOR $11; strPasswdChallenge ALIAS FOR $12; strPasswdChallengeResponse ALIAS FOR $13; BEGIN UPDATE TS_USERS SET LOGIN = strLogin, EMAIL = strEmail, TITLE = strTitle, FIRST_NAME = strFirstName, LAST_NAME = strLastName, DATE_CREATION = TIMESTAMP (strDateCreation), DATE_LAST_ACCESS = TIMESTAMP (strDateLastAccess), ACC_LOCKED = strAccLocked, ACC_DISABLED = strAccDisabled, PASSWD_CHALLENGE = strPasswdChallenge, PASSWD_CHALLENGE_RESPONSE = strPasswdChallengeResponse WHERE ID = intId; RETURN 1; END; ' LANGUAGE 'plpgsql'; ------- While not reaching the limit of arguments, this function, when called, gives me this error: Query error [SELECT devUsersUpdate ('1', 'root', '', 'root@somehost.com', '', 'Super', 'User', '0001-01-01', '0001-01-01', 'N', 'N', '', '')]: ERROR: parser: parse error at or near "$6" which, by the way, didn't happened in postgresql 7.1.2... Anyone had this problem or knows the answer to it?