Unusual behaviour with intarray

From: Adam Witney <awitney(at)sghms(dot)ac(dot)uk>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Unusual behaviour with intarray
Date: 2003-04-24 10:59:57
Message-ID: BACD823D.17846%a.witney@sghms.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I am using intarray in contrib, and have seen some strange behaviour with
one of the operations. Anyone know whats going on here?

cabbage=# create table test (id int, writers int[]);
CREATE TABLE
cabbage=# insert into test values(1, '{}');
INSERT 1545023 1
cabbage=# select * from test;
id | writers
----+---------
1 | {}
(1 row)

cabbage=# update test set writers = (select writers - '{1}'::int[]);
UPDATE 1
cabbage=# select * from test;
id | writers
----+---------
1 | {}
(1 row)

cabbage=# update test set writers = (select writers - '{1}'::int[]);
UPDATE 1
cabbage=# select * from test;
id | writers
----+-----------
1 | {3044207}
(1 row)

Thanks for any help

Adam

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Teodor Sigaev 2003-04-24 12:14:49 Re: Unusual behaviour with intarray
Previous Message Richard Huxton 2003-04-24 09:15:27 Re: jdbc problem