dbTalk Databases Forums  

Re: [BUGS] BUG #1674: CREATE TABLE "name" (with double quotes) and

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] BUG #1674: CREATE TABLE "name" (with double quotes) and in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Neil Conway
 
Posts: n/a

Default Re: [BUGS] BUG #1674: CREATE TABLE "name" (with double quotes) and - 05-19-2005 , 08:40 AM






Herman Bos wrote:
Quote:
vib=> select * from "bedrag";
ERROR: relation "bedrag" does not exist
Naturally: there is no such table, regardless of case.

Quote:
vib=> select "BEDRAG" from sancties;
BEDRAG
--------
(0 rows)
Not with the SQL you provided:

neilc=# select "BEDRAG" from sancties;
ERROR: relation "sancties" does not exist

Quote:
I was wondering if this behavior is correct.
This behavior is intended, although it is true some people find it
confusing. The logic is:

- identifiers specified without double-quotes are folded to lower case
- identifiers specified with double-quotes are not case folded

So your DDL creates a table called SANCTIES since the table name is
double-quoted, whereas "SELECT * FROM SANCTIES" is actually looking for
a table called "sancties". See here for more info:

http://www.postgresql.org/docs/8.0/i...AX-IDENTIFIERS

-Neil

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.