Re: Unusual behaviour with intarray

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Adam Witney <awitney(at)sghms(dot)ac(dot)uk>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-general <pgsql-general(at)postgresql(dot)org>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: Unusual behaviour with intarray
Date: 2003-04-24 13:50:51
Message-ID: 3EA7EBBB.4050501@sigaev.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Please apply patch for 7.3 CVS brach. Patch fixes the problem, for 7.4 it will
be later (with other changes).

Teodor Sigaev wrote:
> Ok, this is a bug.
> I'll post a patch as soon as possible.
>
> Adam Witney wrote:
>
>> 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
>>
>>
>

--
Teodor Sigaev E-mail: teodor(at)sigaev(dot)ru

Attachment Content-Type Size
_int.patch.gz application/x-tar 575 bytes

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2003-04-24 14:03:21 Re: Maximum number of connections
Previous Message Devrim GUNDUZ 2003-04-24 13:31:40 Re: Maximum number of connections