Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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'');
     str := to_char($1, \'YYYY\');
according to taste.

			regards, tom lane

In response to

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group