Re: very odd behavior

From: Patrick Welche <prlw1(at)newn(dot)cam(dot)ac(dot)uk>
To: newsreader(at)mediaone(dot)net
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: very odd behavior
Date: 2001-05-10 18:51:46
Message-ID: 20010510195146.C3314@quartz.newn.cam.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, May 10, 2001 at 02:08:56PM -0400, newsreader(at)mediaone(dot)net wrote:
> I have 7.1
>
> Can someone take a look the following
> and tell me why I'm getting errors?
> I'm completely baffled!
> ----------------------------
>
> what=> create table bla(desc text,def text,data text);
> ERROR: parser: parse error at or near "desc"
> what=> create table bla("desc" text,def text,data text);
> CREATE
> what=>

desc is used to mean descending, as in "order by foo desc". If you enclose
that keyword in quotes, then the parser knows you are using it as a field
name and doesn't wonder about what should be descending..

Cheers,

Patrick

In response to

Browse pgsql-general by date

  From Date Subject
Next Message ryan 2001-05-10 19:10:58 Re: Query not using index
Previous Message Jeff Daugherty 2001-05-10 18:51:34 Re: very odd behavior