Re: column names with - and (

From: "maria s" <psmg01(at)gmail(dot)com>
To: "Oliveiros Cristina" <oliveiros(dot)cristina(at)marktest(dot)pt>
Cc: "Osvaldo Rosario Kussama" <osvaldo(dot)kussama(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org, "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>, "Ivan Sergio Borgonovo" <mail(at)webthatworks(dot)it>
Subject: Re: column names with - and (
Date: 2008-07-29 16:39:30
Message-ID: d9d42a0f0807290939g3436a2cdx127a17d4b42d94c0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Its okay, Yes I am using quotes. Michael was telling that too.

Thanks for all the help at all times.

Maria

On Tue, Jul 29, 2008 at 12:37 PM, Oliveiros Cristina <
oliveiros(dot)cristina(at)marktest(dot)pt> wrote:

> You can enclose the names in quotes, then the characters are allowed
>
> Sorry to mislead you :p
>
> Best,
> Oliveiros
>
>
>
> ----- Original Message -----
> *From:* Oliveiros Cristina <oliveiros(dot)cristina(at)marktest(dot)pt>
> *To:* maria s <psmg01(at)gmail(dot)com> ; Osvaldo Rosario Kussama<osvaldo(dot)kussama(at)gmail(dot)com>;
> pgsql-sql(at)postgresql(dot)org ; Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> ; Ivan
> Sergio Borgonovo <mail(at)webthatworks(dot)it>
> *Sent:* Tuesday, July 29, 2008 5:27 PM
> *Subject:* Re: [SQL] column names with - and (
>
> Maria,
>
> The minus, open bracket and close bracket are illegal as identifier names
>
>
> http://www.postgresql.org/docs/8.3/static/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
>
> Best,
> Oliveiros
>
>
> ----- Original Message -----
> *From:* maria s <psmg01(at)gmail(dot)com>
> *To:* Osvaldo Rosario Kussama <osvaldo(dot)kussama(at)gmail(dot)com> ;
> pgsql-sql(at)postgresql(dot)org ; Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> ; Ivan
> Sergio Borgonovo <mail(at)webthatworks(dot)it>
> *Sent:* Tuesday, July 29, 2008 5:06 PM
> *Subject:* [SQL] column names with - and (
>
> Hi All,
> When I am fetching the data from a table,
> I am giving the column names with - and ( and ) like IL-a, IL-a(p30) etc..
>
> select x1 as IL-a, x2 as IL-a(p30) from abc
>
> But I am getting
>
> ERROR: syntax error at or near "-" and also t "(" , ")"
>
> Can anyone help me to fix this?
>
> Thank you,
> Maria
>
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Ryan Wallace 2008-07-29 18:31:48 Identifying which column matches a full text search
Previous Message Oliveiros Cristina 2008-07-29 16:37:06 Re: column names with - and (