[BUGS] update on unique constraint

2000-11-22 Thread Theo Kramer

postgresql 7.0.3 on RedHat 7.0
--

create table whois (domain text, version integer);
CREATE
theo=# create unique index whois_idx on whois (domain,version);
CREATE
theo=# insert into whois values ('mydomain.co.za', 0);
INSERT 18829 1
theo=# insert into whois values ('mydomain.co.za', 1);
INSERT 18830 1
theo=# insert into whois values ('mydomain.co.za', 2);
INSERT 18831 1
theo=# update whois set version = version + 1 where domain = 'mydomain.co.za';
ERROR:  Cannot insert a duplicate key into unique index whois_idx

Oracle 8.1.6 on RedHat 6.2
--
SQL> create table whois (domain varchar2(64), version integer);

Table created.

SQL> create unique index whois_idx on whois (domain,version);

Index created.

SQL> insert into whois values ('mydomain.co.za', 0);
1 row created.

SQL> insert into whois values ('mydomain.co.za', 1);

1 row created.

SQL> insert into whois values ('mydomain.co.za', 2);

1 row created.

SQL> update whois set version = version + 1 where domain = 'mydomain.co.za';

3 rows updated.

SQL> select * from whois;

DOMAIN   VERSION
 --
mydomain.co.za   1
mydomain.co.za   2
mydomain.co.za   3

SQL>

Ideas/thoughts?

I think oracle is correct - no contraints are violated and the update
should be atomic.

Regards
Theo



[BUGS] STDC_HEADERS on Solaris 8

2000-11-22 Thread Matt Benjamin


I don't think this is really a bug, however, maybe it is something for the
Solaris FAQ?

I found that on my (relatively typical, for a certain type of
installation) sparc Solaris 8 installation, STDC_HEADERS ended up
undefined in config.h.  

I noticed on the web that this happens to people from time to time, with
Solaris 7 and 8.  

To "fix" this, I just defined STDC_HEADERS, as have the other folks.

I don't have time to sort out the root cause.  However, I can give some
details of the configuration:

1. Complete 32/64-bit Solaris 8 install 

2. GNU GCC 2.95.2 is the default, and only compiler on the system, in the
configuration Sun pre-installs with the "Solaris Software Companion CD"

3. The standard ld, ar, as are Sun, in the standard locations--the GNU
binutils are NOT installed

4. I did install GNU ncurses 5.1, which created a lot of warning noise in
config.log

Hope this helps someone...


Matt
 




Re: [BUGS] STDC_HEADERS on Solaris 8

2000-11-22 Thread Tom Lane

Matt Benjamin <[EMAIL PROTECTED]> writes:
> I found that on my (relatively typical, for a certain type of
> installation) sparc Solaris 8 installation, STDC_HEADERS ended up
> undefined in config.h.  

Hmm ... it'd probably be useful to see the config.log contents
to figure out why that's happening.

regards, tom lane