Re: create function problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Thomas Leung" <thomasleung(at)hotmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: create function problem
Date: 2004-03-19 15:25:52
Message-ID: 24380.1079709952@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Thomas Leung" <thomasleung(at)hotmail(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Luz Aida Uribe Velez 2004-03-19 15:25:57 Differential Backup
Previous Message Tom Lane 2004-03-19 15:20:03 Re: pgdump - What happens to data modifications (INSERT, UPDATE, DELETE) while pgdump is running?