Skip site navigation (1) Skip section navigation (2)

MySQL/PostgreSQL discrepancy

From: Ken Smith <ken(at)turbolinux(dot)co(dot)jp>
To: pgsql-bugs(at)postgresql(dot)org
Subject: MySQL/PostgreSQL discrepancy
Date: 2000-10-27 06:28:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
I believe I have found a bug.  I don't know whether the bug is with
PostgreSQL, MySQL, or the SQL specification.  Please help me to
understand what I have.  Thank you.

PostgreSQL version: 7.0.2
Platform: PentiumIII550x2, 512MB SDRAM, Linux2.2.13, glibc-2.1.2
[ken(at)ken ken]$ ldd /usr/bin/psql => /usr/lib/ (0x4001b000) => /lib/ (0x4002d000) => /lib/ (0x4005a000) => /lib/ (0x40071000) => /lib/ (0x40074000) => /lib/ (0x40091000) => /usr/lib/ (0x40095000) => /usr/lib/ (0x400ba000) => /lib/ (0x400fb000)
        /lib/ => /lib/ (0x40000000)

Run 'psql', then enter the following except for the select statement

create table test (name char, a int, b int);
insert into test values ('x', 1, 2);
select * from test;
update test set a=3,b=a where name='x';
insert into test values ('y', 1, 2);
update test set b=a,a=3 where name='y';
select * from test;
 name | a | b
 x    | 3 | 1
 y    | 3 | 1
drop table test;

I am used to MySQL so I expected the following from the select
 name | a | b
 x    | 3 | 3
 y    | 3 | 1

Which behavior is the correct?


pgsql-bugs by date

Next:From: robDate: 2000-10-27 13:27:43
Subject: Bug report #53
Previous:From: Tom LaneDate: 2000-10-27 03:07:57
Subject: Re: Updating multiple bool values crashes backend

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group