small problem updating to 7.2...

Started by GB Clarkover 24 years ago4 messagesgeneral
Jump to latest
#1GB Clark
postgres@vsservices.com

Hi,

I've got a database that has a column named timestamp.
Of course is this the same a type and now 7.2 will not allow me to access it
directly. Any ideas how I can get to the data until I redesign the schema?

Here is an example from it:

helpshop=# select * from customer as C where C.timestamp = '2001-09-09';
ERROR: parser: parse error at or near "timestamp"

this worked fine for 7.1.2.

thanks for the help.

GB

--
GB Clark II | Roaming FreeBSD Admin
gclarkii@VSServices.COM | General Geek
CTHULU for President - Why choose the lesser of two evils?

#2Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: GB Clark (#1)
Re: small problem updating to 7.2...

On Wed, 7 Nov 2001, GB Clark II wrote:

Hi,

I've got a database that has a column named timestamp.
Of course is this the same a type and now 7.2 will not allow me to access it
directly. Any ideas how I can get to the data until I redesign the schema?

Here is an example from it:

helpshop=# select * from customer as C where C.timestamp = '2001-09-09';
ERROR: parser: parse error at or near "timestamp"

It should be enough to double quote timestamp when you want to refer to
the column.

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: GB Clark (#1)
Re: small problem updating to 7.2...

double quotes are your friend:

C."timestamp" = ...

regards, tom lane

#4GB Clark
postgres@vsservices.com
In reply to: Tom Lane (#3)
Re: small problem updating to 7.2...

On Wednesday 07 November 2001 20:34, you wrote:

double quotes are your friend:

C."timestamp" = ...

regards, tom lane

Tom and Stephan,

I did try double quoting, but I was doing it to the entire string
(i.e. "C.timestamp") and that was not working. I was under the impression
,wrong here, that the variable was one piece.

Thanks,

GB

--
GB Clark II | Roaming FreeBSD Admin
gclarkii@VSServices.COM | General Geek
CTHULU for President - Why choose the lesser of two evils?