Re: create function problem - Mailing list pgsql-admin

From Tom Lane
Subject Re: create function problem
Date
Msg-id 24380.1079709952@sss.pgh.pa.us
Whole thread Raw
In response to create function problem  ("Thomas Leung" <thomasleung@hotmail.com>)
List pgsql-admin
"Thomas Leung" <thomasleung@hotmail.com> writes:
>     str := to_char($1, "YYYY");

> ERROR:  Attribute "YYYY" not found

Double and single quotes are not interchangeable.  Here you have written
an identifier, not a string literal.  You'll need
     str := to_char($1, ''YYYY'');
or
     str := to_char($1, \'YYYY\');
according to taste.

            regards, tom lane

pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: unimplemented functions
Next
From: "scott.marlowe"
Date:
Subject: Re: Re-Init database cluster.