dbTalk Databases Forums  

[BUGS] UNIQUE INDEX difference between 7.2 and 7.3

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


Discuss [BUGS] UNIQUE INDEX difference between 7.2 and 7.3 in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kevin Houle
 
Posts: n/a

Default [BUGS] UNIQUE INDEX difference between 7.2 and 7.3 - 08-12-2003 , 10:11 AM






--==========1808759384==========
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Your name : Kevin Houle
Your email address : kjh (AT) cert (DOT) org


System Configuration
- ----------------------
Architecture : i686

Operating System : RH9, 2.4.20-19

PostgreSQL version : PostgreSQL-7.3.4 (RPMS from PGDG)

Please enter a FULL description of your problem:
- -------------------------------------------------

There is an email attachment (md5: 5cc780da645df9516235d43d1cf1e8b5)
which contains a file with two SQL INSERT commands to insert two rows
into a test table. The table should look like this:

CREATE TABLE tbl_test (
testcol text,
unique (testcol)
);

The databases in my testing are using SQL_ASCII encoding.

Executing the two attached INSERT statements produces a duplicate
key error on PostgreSQL 7.3.2 (as distributed by Red Hat) and 7.3.4
(as distributed by PGDG). Running on PostgreSQL 7.2.4 (PGDG) under
RH7.3, these two INSERTs work flawlessly. In all tests, I've executed
the INSERTs using

psql -d dbname -f filename.sql

The values in the two INSERTs are unicode filenames and they are
different. Something seems to have changed between 7.2 and 7.3 with
regard to how the values are handled, but I cannot find anything
in the docs to suggest what that change might be. So, I'm reporting
it as a bug in case it shouldn't have changed.

Regards,
Kevin

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/OQM4u/NTC+XTbEkRAjtuAJ9DIFwrmRegc8jFkY/XKNxAjqywzACg3LnV
cosGfdzXiqcAhKJ1144Zhq0=
=9gDf
-----END PGP SIGNATURE-----

--==========1808759384==========
Content-Type: application/octet-stream; name="file.sql"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="file.sql"; size=128

aW5zZXJ0IGludG8gdGJsX3Rlc3QgKHRlc3Rjb2wpIHZhbHVlcy AoJ9PQ1ve7
+s/Cz9/H69ei0uIud2F2Jyk7Cmluc2VydCBpbnRvIHRibF90ZXN0ICh0Z XN0
Y29sKSB2YWx1ZXMgKCfT0Nb3u/rJz8/fx+vXotLiLndhdicpOwo=

--==========1808759384==========
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

--==========1808759384==========--


Reply With Quote
  #2  
Old   
Stephan Szabo
 
Posts: n/a

Default Re: [BUGS] UNIQUE INDEX difference between 7.2 and 7.3 - 08-12-2003 , 10:21 AM







On Tue, 12 Aug 2003, Kevin Houle wrote:

Quote:
System Configuration
- ----------------------
Architecture : i686

Operating System : RH9, 2.4.20-19

PostgreSQL version : PostgreSQL-7.3.4 (RPMS from PGDG)

Please enter a FULL description of your problem:
- -------------------------------------------------

There is an email attachment (md5: 5cc780da645df9516235d43d1cf1e8b5)
which contains a file with two SQL INSERT commands to insert two rows
into a test table. The table should look like this:

CREATE TABLE tbl_test (
testcol text,
unique (testcol)
);

The databases in my testing are using SQL_ASCII encoding.
I don't receive an error on my 7.3.4 system, what locale is the database
initialized in?


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #3  
Old   
Kevin Houle
 
Posts: n/a

Default Re: [BUGS] UNIQUE INDEX difference between 7.2 and 7.3 - 08-12-2003 , 10:32 AM



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- --On Tuesday, August 12, 2003 08:18:53 AM -0700 Stephan Szabo
<sszabo@megazone
..bigpanda.com> wrote:

Quote:
On Tue, 12 Aug 2003, Kevin Houle wrote:

System Configuration
- ----------------------
Architecture : i686

Operating System : RH9, 2.4.20-19

PostgreSQL version : PostgreSQL-7.3.4 (RPMS from PGDG)

Please enter a FULL description of your problem:
- -------------------------------------------------

There is an email attachment (md5: 5cc780da645df9516235d43d1cf1e8b5)
which contains a file with two SQL INSERT commands to insert two rows
into a test table. The table should look like this:

CREATE TABLE tbl_test (
testcol text,
unique (testcol)
);

The databases in my testing are using SQL_ASCII encoding.

I don't receive an error on my 7.3.4 system, what locale is the database
initialized in?
I'm using defaults, so on RH9 it is:

/var/lib/pgsql/initdb.i18n:
LANG="en_US.UTF-8"

and on RH7.3 it is:

/var/lib/pgsql/initdb.i18n:
LANG="en_US"

Kevin



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/OQeiu/NTC+XTbEkRAqyCAJ9dWKLKDy7ikbFFNwc6bzt7rEqj+wCfevAe
LOaw4FFNrbr6wdtl0Zls+cU=
=X2Z2
-----END PGP SIGNATURE-----


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


Reply With Quote
  #4  
Old   
Stephan Szabo
 
Posts: n/a

Default Re: [BUGS] UNIQUE INDEX difference between 7.2 and 7.3 - 08-12-2003 , 10:48 AM



On Tue, 12 Aug 2003, Kevin Houle wrote:

Quote:
There is an email attachment (md5: 5cc780da645df9516235d43d1cf1e8b5)
which contains a file with two SQL INSERT commands to insert two rows
into a test table. The table should look like this:

CREATE TABLE tbl_test (
testcol text,
unique (testcol)
);

The databases in my testing are using SQL_ASCII encoding.

I don't receive an error on my 7.3.4 system, what locale is the database
initialized in?

I'm using defaults, so on RH9 it is:

/var/lib/pgsql/initdb.i18n:
LANG="en_US.UTF-8"
Okay, I see it with en_US.UTF-8, but not with C locale, nor with
en_US or en_US.iso885915. It looks like the comparison rules are
different between the locales (and I'm not sure if SQL_ASCII encoding
and a UTF8 locale makes sense in practice).



---------------------------(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


Reply With Quote
  #5  
Old   
Kevin Houle
 
Posts: n/a

Default Re: [BUGS] UNIQUE INDEX difference between 7.2 and 7.3 - 08-12-2003 , 11:55 AM



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- --On Tuesday, August 12, 2003 08:47:08 AM -0700 Stephan Szabo
<sszabo@megazone
..bigpanda.com> wrote:

Quote:
On Tue, 12 Aug 2003, Kevin Houle wrote:

There is an email attachment (md5: 5cc780da645df9516235d43d1cf1e8b5)
which contains a file with two SQL INSERT commands to insert two rows
into a test table. The table should look like this:

CREATE TABLE tbl_test (
testcol text,
unique (testcol)
);

The databases in my testing are using SQL_ASCII encoding.

I don't receive an error on my 7.3.4 system, what locale is the
database initialized in?

I'm using defaults, so on RH9 it is:

/var/lib/pgsql/initdb.i18n:
LANG="en_US.UTF-8"

Okay, I see it with en_US.UTF-8, but not with C locale, nor with
en_US or en_US.iso885915. It looks like the comparison rules are
different between the locales (and I'm not sure if SQL_ASCII encoding
and a UTF8 locale makes sense in practice).
Good point. I don't see the behavior with locale=en_US, either. I'll
use that as a work-around. Probably a few other RH9 users out there
getting into the same situation using the PGDG and Red Hat RPMS.

I appreciate your taking the time to look at this.

Cheers,
Kevin


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE/ORu7u/NTC+XTbEkRAiwlAKCkqpPyQX7mLXx5iKMAAf7v03t6JwCfUvIB
qL8Xz60qXwigV/LnzkGTM8M=
=Q0iV
-----END PGP SIGNATURE-----


---------------------------(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.