Re: Bug #851: cast() no longer works in array inserts

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Malcolm Tredinnick <malcolm(at)commsecure(dot)com(dot)au>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #851: cast() no longer works in array inserts
Date: 2002-12-19 06:16:44
Message-ID: 15985.1040278604@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Malcolm Tredinnick <malcolm(at)commsecure(dot)com(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2002-12-20 11:17:34 Bug #852: Wrong sequence name generated
Previous Message Tom Lane 2002-12-19 05:48:17 Re: Bug #851: cast() no longer works in array inserts