Received: from ns.krot.org (ns.krot.org [193.212.103.165]) by postgresql.org (8.11.3/8.11.4) with SMTP id fAFDdgm09313 for ; Thu, 15 Nov 2001 08:39:46 -0500 (EST) (envelope-from postgresql@envisity.com) Received: (qmail 16085 invoked by uid 67); 15 Nov 2001 13:38:13 -0000 Message-ID: <20011115133813.8842.qmail@ns.krot.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline MIME-Version: 1.0 From: "Aasmund Midttun Godal" To: pgsql-sql@postgresql.org Subject: Unable to use '-' in column names in PLPGSQL Date: Thu, 15 Nov 2001 13:38:13 GMT X-Mailer: Googley-Moogley Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by postgresql.org id fAFDeTL09339 X-Archive-Number: 200111/194 X-Sequence-Number: 5578 CREATE FUNCTION is_parent(INTEGER, INTEGER) RETURNS BOOLEAN AS ' DECLARE parent ALIAS FOR $1; tull ALIAS for $2; kid INTEGER; BEGIN kid := tull; LOOP SELECT INTO kid "dir-id" FROM dir WHERE id = kid; IF kid = parent THEN RETURN TRUE; END IF; IF kid IS NULL THEN RETURN FALSE; END IF; END LOOP; END; ' LANGUAGE 'plpgsql'; Will cause the following compilation error: NOTICE: plpgsql: ERROR during compile of is_parent near line 8 ERROR: unterminated " If I change the column name to dir_id it works fine. It does not matter whether or not I use quotes. Aasmund Midttun Godal aasmund@godal.com - http://www.godal.com/ +47 40 45 20 46