From: Aasmund Midttun Godal <postgresql@envisity.com>
To: pgsql-sql@postgresql.org
Subject: Unable to use '-' in column names in PLPGSQL
Date: Thu, 15 Nov 2001 13:38:13 GMT
Message-ID: <20011115133813.8842.qmail@ns.krot.org> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: postgresql@envisity.com
Subject: Re: Unable to use '-' in column names in PLPGSQL
In-Reply-To: <20011115133813.8842.qmail@ns.krot.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox