double quotes in unicode dbs

Started by Peter Novodvorskyover 23 years ago4 messagesgeneral
Jump to latest
#1Peter Novodvorsky
nidd@altlinux.com

Hello!

I'm writing native driver for OpenOffice.Org for PostgreSQL. I used
to use 8-bit charset db to test a driver (koi8-r, actually), and when I
tried UNICODE db I've found the following problem: queries with double
quotes don't work. For example,

SELECT * FROM TEST1;

works, but

SELECT * FROM "TEST1";

doesn't. I'd gladly remove all quoting of table names, but it is done
by sdbc layer of OpenOffice.Org, and I don't want to hack it.

Is it bug of PostgreSQL multibyte support or mine syntax error?

Thanks.

--
Peter Novodvorsky nidd@myxomop.com
http://garcia.myxomop.com/NiddWiki Deadheads, unite!

#2Thomas Beutin
tyrone@laokoon.IN-Berlin.DE
In reply to: Peter Novodvorsky (#1)
Re: double quotes in unicode dbs

Hi Peter,

On Thu, Aug 08, 2002 at 04:48:02PM +0400, Peter Novodvorsky wrote:

I'm writing native driver for OpenOffice.Org for PostgreSQL. I used
to use 8-bit charset db to test a driver (koi8-r, actually), and when I
tried UNICODE db I've found the following problem: queries with double
quotes don't work. For example,

SELECT * FROM TEST1;

works, but

SELECT * FROM "TEST1";

doesn't. I'd gladly remove all quoting of table names, but it is done
by sdbc layer of OpenOffice.Org, and I don't want to hack it.

If You are quoting the table names they are treated case sensitive.
Is there an table TEST1 in Your database?

Greetings,
-tb
--
Thomas Beutin tb@laokoon.IN-Berlin.DE
Beam me up, Scotty. There is no intelligent live down in Redmond.

#3Holger Klawitter
lists@klawitter.de
In reply to: Peter Novodvorsky (#1)
Re: double quotes in unicode dbs

SELECT * FROM TEST1;

works, but

SELECT * FROM "TEST1";

It might be a normal case problem.

Doublequotes make Postgres preserve the case of table names otherwise every is
being converted to lower case. Probably your table is named in lowercase
(either by creating it using "test1" or TEST1 without the double quotes).
You can see the interal name with the "\d" command.

With kind regards / mit freundlichem Gruß
Holger Klawitter
--
Holger Klawitter http://www.klawitter.de
lists@klawitter.de

#4Peter Novodvorsky
nidd@altlinux.com
In reply to: Holger Klawitter (#3)
Re: double quotes in unicode dbs

Holger Klawitter <lists@klawitter.de> writes:

SELECT * FROM TEST1;

works, but

SELECT * FROM "TEST1";

It might be a normal case problem.

Doublequotes make Postgres preserve the case of table names otherwise every is
being converted to lower case. Probably your table is named in lowercase
(either by creating it using "test1" or TEST1 without the double quotes).
You can see the interal name with the "\d" command.

Thank you very much. It helped me to solve the problem.

--
Peter Novodvorsky nidd@myxomop.com
http://garcia.myxomop.com/NiddWiki Deadheads, unite!
Kill 'em all, and let God sort 'em out