472,333 Members | 1,103 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,333 software developers and data experts.

Casing: bug?

Hello there,

I have quite problem with PG 7.3 & 7.4b5
I create tables using pgAdmin3 v-1.0.1
I created a table "xType". Pay attention to capital "T" letter.
Than I tryed to insert data to it using psql tool.
But I have error: 'ERROR: relation "xtype" does not exist'
In error all chars are small!
If I create table in pgAdmin using all small chars, everithing works fine.

Note: when I create table with a capital chars from psql, it is created with
small chars.

Ok, as I write this mail I found ansver to my question: I have to wrap table
names in quote chars to avoid downcasing. I have to write:
select * from "xType";
than it works.

So now question is: why "select * from xTypes" is a wrong query, why table
name is downcasing if it is not wrapped in quote? Is it a bug, or it's
according to some standard?

Doesn't it violate documentation:
==========================
Identifier and key word names are case insensitive. Therefore
UPDATE MY_TABLE SET A = 5;
can equivalently be written as
uPDaTE my_TabLE SeT a = 5;
==========================

Thanks,

Vadim Chekan.
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #1
2 1340
If you put quotes arounds the table name when you create it, then you will
need then whenever you refer to it also. If when you create the table you
don't use quotes, then you won't need then during the query either, as the
documentation says.

Without quotes, Postgresql is neither case-sensetive nor case-preserving.
With quotes it's both.

Hoe this helps,

On Sun, Oct 26, 2003 at 10:43:58AM +0000, Vadim Chekan wrote:
Hello there,

I have quite problem with PG 7.3 & 7.4b5
I create tables using pgAdmin3 v-1.0.1
I created a table "xType". Pay attention to capital "T" letter.
Than I tryed to insert data to it using psql tool.
But I have error: 'ERROR: relation "xtype" does not exist'
In error all chars are small!
If I create table in pgAdmin using all small chars, everithing works fine.

Note: when I create table with a capital chars from psql, it is created with
small chars.

Ok, as I write this mail I found ansver to my question: I have to wrap table
names in quote chars to avoid downcasing. I have to write:
select * from "xType";
than it works.

So now question is: why "select * from xTypes" is a wrong query, why table
name is downcasing if it is not wrapped in quote? Is it a bug, or it's
according to some standard?

Doesn't it violate documentation:
==========================
Identifier and key word names are case insensitive. Therefore
UPDATE MY_TABLE SET A = 5;
can equivalently be written as
uPDaTE my_TabLE SeT a = 5;
==========================

Thanks,

Vadim Chekan.


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
--
Martijn van Oosterhout <kl*****@svana.org> http://svana.org/kleptog/ "All that is needed for the forces of evil to triumph is for enough good
men to do nothing." - Edmond Burke
"The penalty good people pay for not being interested in politics is to be
governed by people worse than themselves." - Plato


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/nEogY5Twig3Ge+YRAgMGAJ425f52xuTfCVZGo2MNLaGu3xq7kg CfchYg
DX66RxWJZda+ahL40AVTWJ4=
=QS9p
-----END PGP SIGNATURE-----

Nov 12 '05 #2
On Sun, Oct 26, 2003 at 10:43:58AM +0000, Vadim Chekan wrote:
Hello there,

I have quite problem with PG 7.3 & 7.4b5
I create tables using pgAdmin3 v-1.0.1
I created a table "xType". Pay attention to capital "T" letter.
And when you created it, dod you write it "xType" or xType? With the
quotes, you enforce cases-sensitivity.
Doesn't it violate documentation:


No. The same page says that "" will enforce the case you wrote.

A

--
----
Andrew Sullivan 204-4141 Yonge Street
Afilias Canada Toronto, Ontario Canada
<an****@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Johannes Koch | last post by:
Hi there, I'd like to apply an xpath to both HTML and XHTML documents. First I create a DOM document with a Java DOM parser, then apply the xpath...
10
by: William Stacey [MVP] | last post by:
Doing a project that makes heavy use of domain names such as "www.yahoo.com." Domain names preserve case but are concidered equal if names are same...
3
by: UmmagummA | last post by:
How to make a ComboBox to display characters only in Upper or Lower Case as you type? I was trying to override OnKeyDown and OnKeyPress but...
4
by: Shabs | last post by:
Hi, We are having this problem here on our project where we store all firstnames, lastnames in the oracle database in uppercase, when we...
2
by: Visual Systems AB \(Martin Arvidsson\) | last post by:
Hi! Is it possible to enable Charater Casing in a ComboBox, if, how? As of now i am using KeyUp event to make sure that the char entered is...
6
by: Smokey Grindle | last post by:
I always learned when you have a constant name it in all upper case like this PASSWORD_MAXIMUM_LENGTH but FxCop is saying this isn't correct,...
10
by: somenath | last post by:
Hi All, I have one question regarding return value cast of malloc. I learned that we should not cast the return value of malloc because it is...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.