dbTalk Databases Forums  

[BUGS] Possible bug in 7.4.5

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


Discuss [BUGS] Possible bug in 7.4.5 in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Devrim GUNDUZ
 
Posts: n/a

Default [BUGS] Possible bug in 7.4.5 - 10-06-2004 , 04:11 AM






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


Hi,

I'm using 7.4.5 on a test platform and had a weird behaviour. Here is the
case:

test=# CREATE TABLE t1 (s_no int2 PRIMARY KEY,a varchar(10));
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "t1_pkey"
for table "t1"
test=# CREATE TABLE t2 (s_no int2, x char(2), CONSTRAINT
s_no_exists FOREIGN KEY(s_no) REFERENCES t1 ON UPDATE CASCADE);
test=# INSERT INTO t1 VALUES ('20','test1');
test=# INSERT INTO t1 VALUES ('21','test2');
test=# BEGIN ;
test=# INSERT INTO t2 VALUES ('20','as');
test=# COMM;
ERROR: syntax error at or near "COMM" at character 1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^
test=# COMMIT ;
COMMIT
^^^^^^^^^^^^^^^

Shouldn't it say "ERROR: current transaction is aborted, commands
ignored until end of transaction block" after the commit?

Since COMMIT was executed 'successfully', I thought that t2 has a row
inside, but:

test=# SELECT * from t2 ;
s_no | x
- ----------+---
(0 rows)

Am I missing something, or is it a bug? I can't reproduce it in 8.0beta2.

Regards,
- --
Devrim GUNDUZ
devrim~gunduz.org devrim.gunduz~linux.org.tr
http://www.tdmsoft.com
http://www.gunduz.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBY7aKtl86P3SPfQ4RAqUjAKDozbghdFKr0nHoO6uHZS oYQcl9FwCdEbtP
uhbCpVAqfhzijJG+g/XDO1Q=
=ROu9
-----END PGP SIGNATURE-----

---------------------------(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
  #2  
Old   
Kris Jurka
 
Posts: n/a

Default Re: [BUGS] Possible bug in 7.4.5 - 10-06-2004 , 07:37 AM








On Wed, 6 Oct 2004, Devrim GUNDUZ wrote:

Quote:
[I say COMMIT on a failed transaction and it looks successful, but isn't.]
This is a long standing behavior. Internally a ROLLBACK happens, but
commit is reported back to the client. This has only changed in 8.0 to
reflect what actually happened.

Kris Jurka

---------------------------(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
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Possible bug in 7.4.5 - 10-06-2004 , 09:13 AM



Devrim GUNDUZ <devrim (AT) gunduz (DOT) org> writes:
Quote:
Am I missing something, or is it a bug? I can't reproduce it in 8.0beta2.
8.0 actually behaves the same way: the COMMIT gets you out of the
transaction block. It just tells you that it's treating it as a
rollback:

regression=# comm;
ERROR: syntax error at or near "comm" at character 1
LINE 1: comm;
^
regression=# commit;
ROLLBACK
regression=#

whereas prior versions did the rollback but still reported the command
tag as COMMIT. AFAIR, Postgres has always acted that way.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
  #4  
Old   
Devrim GUNDUZ
 
Posts: n/a

Default Re: [BUGS] Possible bug in 7.4.5 - 10-06-2004 , 09:39 AM



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


Hi,

On Wed, 6 Oct 2004, Tom Lane wrote:

Quote:
Devrim GUNDUZ <devrim (AT) gunduz (DOT) org> writes:
Am I missing something, or is it a bug? I can't reproduce it in 8.0beta2.
<snip>
Quote:
whereas prior versions did the rollback but still reported the command
tag as COMMIT. AFAIR, Postgres has always acted that way.
Ok got it, thanks.

Do we still need a backported fix? Software developers (PHP developers,
for example) may get confused from the error message they get.

Regards,
- --
Devrim GUNDUZ
devrim~gunduz.org devrim.gunduz~linux.org.tr
http://www.tdmsoft.com
http://www.gunduz.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBZANGtl86P3SPfQ4RAtfnAJ0R64Y7/2yZqINTlNdgSI1mExg6vACg0XTb
cSA9IIv5Dng8k+ot3ylIQEw=
=/ykx
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Reply With Quote
  #5  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Possible bug in 7.4.5 - 10-06-2004 , 09:41 AM



Devrim GUNDUZ <devrim (AT) gunduz (DOT) org> writes:
Quote:
Do we still need a backported fix?
No. This is a behavioral change of a *very* longstanding behavior.
It's going in at 8.0, not 7.4.something.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


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.