473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 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 1381
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 with Xalan's XPathAPI class. The problem is that...
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 but case is different. I know I can store these...
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 coudn't figure it out. The problem is that in...
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 retrieve the data to be used in web application and...
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 Uppercase. Regards Martin Arvidsson
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, but doesnt tell me the correct "accepted" way in...
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 bug hider. But my question is as mentioned...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.