Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group