Re: Bug #851: cast() no longer works in array inserts - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Bug #851: cast() no longer works in array inserts
Date
Msg-id 15985.1040278604@sss.pgh.pa.us
Whole thread Raw
In response to Bug #851: cast() no longer works in array inserts  (pgsql-bugs@postgresql.org)
List pgsql-bugs
Malcolm Tredinnick <malcolm@commsecure.com.au> writes:
> So given that one cannot just insert 0 into a bigint field (even an
> array of bigints), since postgres complains it is not of the correct
> type, how is one supposed to fille a field of bigint[] with {0, 0}?

I must be missing something ... what is wrong with

regression=# create table foo (bar bigint[]);
CREATE TABLE
regression=# insert into foo values ('{0, 0}');
INSERT 1101788 1
regression=# select * from foo;
  bar
-------
 {0,0}
(1 row)

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug #851: cast() no longer works in array inserts
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #852: Wrong sequence name generated