Re: Column does not exists? - Mailing list pgsql-general

From Leonardo M. Ramé
Subject Re: Column does not exists?
Date
Msg-id 5514402C.4000809@griensu.com
Whole thread Raw
In response to Re: Column does not exists?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Responses Re: Column does not exists?  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
El 26/03/15 a las 14:18, Adrian Klaver escibió:
> On 03/26/2015 10:12 AM, "Leonardo M. Ramé" wrote:
>> Ok, I have this table:
>>
>> CREATE TABLE sessions
>> (
>>    "SESSIONID" integer NOT NULL,
>>    "SESSIONTIMESTAMP" character varying(45) NOT NULL,
>>    "SESSIONDATA" character varying(200) DEFAULT NULL::character varying,
>>    CONSTRAINT sessions_pkey PRIMARY KEY ("SESSIONID")
>> )
>>
>> Now, when I do:
>>
>> DELETE From sessions WHERE SESSIONTIMESTAMP < '2010-01-01 10:02:02'
>>
>> I get:
>>
>> ERROR:  column "sessiontimestamp" does not exist
>> LINE 1: DELETE From sessions WHERE SESSIONTIMESTAMP < '2010-01-01 10...
>>                                     ^
>> ********** Error **********
>>
>> ERROR: column "sessiontimestamp" does not exist
>> SQL state: 42703
>> Character: 28
>>
>> But if I do:
>>
>> DELETE From sessions WHERE "SESSIONTIMESTAMP" < '2010-01-01 10:02:02'
>>
>> It DOES work.
>>
>> Why the db doesn't recognize the name of the table without quotes?.
>
> See here, bottom of 4.1.1. Identifiers and Key Words:
>
> http://www.postgresql.org/docs/9.3/interactive/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS
>

Thanks, then it looks like SESSIONTIMESTAMP is an identifier?.


pgsql-general by date:

Previous
From: Bill Moran
Date:
Subject: Re: Column does not exists?
Next
From: Francisco Olarte
Date:
Subject: Re: Column does not exists?