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: 39F92091.AB6C265E@turbolinux.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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.

THE TEST SYSTEM
PostgreSQL version: 7.0.2
Platform: PentiumIII550x2, 512MB SDRAM, Linux2.2.13, glibc-2.1.2
[ken(at)ken ken]$ ldd /usr/bin/psql
libpq.so.2.1 => /usr/lib/libpq.so.2.1 (0x4001b000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x4002d000)
libnsl.so.1 => /lib/libnsl.so.1 (0x4005a000)
libdl.so.2 => /lib/libdl.so.2 (0x40071000)
libm.so.6 => /lib/libm.so.6 (0x40074000)
libutil.so.1 => /lib/libutil.so.1 (0x40091000)
libreadline.so.4.0 => /usr/lib/libreadline.so.4.0 (0x40095000)
libncurses.so.5 => /usr/lib/libncurses.so.5 (0x400ba000)
libc.so.6 => /lib/libc.so.6 (0x400fb000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

THE TEST
Run 'psql', then enter the following except for the select statement
output.

---BEGIN---
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;
---END---

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

Which behavior is the correct?

Responses

Browse pgsql-bugs by date

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