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: 24380.1079709952@sss.pgh.pa.us (view raw or flat)
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

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-2014 The PostgreSQL Global Development Group