Alvaro Herrera wrote:
I think this is most surprising behavior -- shouldn't the UPDATE raise
an error?

Surprising, but not new (probably has been there back to the Berkley code), and has come up before on one of the lists (I think it might even have been pgsql-bugs).


regression=# select version();
version
------------------------------------------------------------------------
PostgreSQL 7.3.5 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
(1 row)


regression=# create table foo (a int[]);
CREATE TABLE
regression=# insert into foo values (null);
INSERT 1104092 1
regression=# update foo set a[3] = '42';
UPDATE 1
regression=# select a, a is null from foo;
 a | ?column?
---+----------
   | t
(1 row)

I'm still hoping to scrounge up the time to continue working on arrays for 7.5, including figuring out how to deal with this.

Joe



---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply via email to