Обсуждение: small problem updating to 7.2...

Поиск
Список
Период
Сортировка

small problem updating to 7.2...

От
GB Clark II
Дата:
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?

Re: small problem updating to 7.2...

От
Stephan Szabo
Дата:
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.



Re: small problem updating to 7.2...

От
Tom Lane
Дата:
double quotes are your friend:

    C."timestamp" = ...

            regards, tom lane

Re: small problem updating to 7.2...

От
GB Clark II
Дата:
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?