On Sat, 3 Nov 2001, Gunnar Lindholm wrote:
>>Well, my only suggestion is:
>>> ivad := nextval("vad_seq");
>> ^^^^^^^^^
>>Should the name be in single quotes?
>Then I get this error...
>ERROR: parser: parse error at or near "vad_seq"
>so there is something I've done wrong, but I can't see....
Are you escaping the single quotes properly? Remember that your PL/pgSQL
function definition is itself bound by single quotes, so inside the code
definition for CREATE FUNCTION that line should look like:
ivad := nextval(''vad_seq'');
or even:
ivad := nextval(\'vad_seq\');
Regards,
Jw.
--
jlx@commandprompt.com
by way of pgsql-general@commandprompt.com