"Thomas Leung" <[EMAIL PROTECTED]> writes:
> str := to_char($1, "");
> ERROR: Attribute "" 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, '''');
or
str := to_char($1
On Tue, 16 Mar 2004, Thomas Leung wrote:
> I want to index my table using the year of the date. So I create the
> following function.
>
> create function to_year(date) returns varchar as '
> declare
> str varchar;
> begin
> str := to_char($1, "");
> return str;
> end;
> ' languag
I want to index my table using the year of the date. So I create the
following function.
create function to_year(date) returns varchar as '
declare
str varchar;
begin
str := to_char($1, "");
return str;
end;
' language 'plpgsql' with (iscachable, isstrict);
But I face the problem as