Search Postgresql Archives

Re: Copying data from int column to array column

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adam Witney <awitney@xxxxxxxxxx> writes:
> UPDATE test SET field2 = field1;
> UPDATE test SET field3[1] = field1;

> Why does the UPDATE of field2 work, but the UPDATE of field3 does not?

Works for me in 8.0 ;-).  Before 8.0, if you tried to assign to just one
value of an array that was initially NULL, the array stayed NULL.

(That behavior made sense from the point of view of the implementation,
which sees array element assignment as a binary operation taking an
array and a new element value ... but it wasn't especially useful.)

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux