![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| ||||
| ||||
|
|
CREATE TABLE dummy (foo INT, bar VARCHAR[]); CREATE TABLE INSERT INTO dummy (foo) VALUES (1); INSERT 43266442 1 SELECT bar IS NULL AS is_null FROM dummy; is_null |
|
UPDATE dummy SET bar[0]='Blah'; UPDATE 1 SELECT * FROM dummy; foo | bar |
|
SELECT bar IS NULL AS is_null FROM dummy; is_null |
|
SELECT version(); version |
#2
| |||
| |||
|
|
When updating a NULL cell which is an array of something, setting an adressed member of a non existent array, the value of the cell is not changed. |
#3
| |||
| |||
|
|
Bertrand Petit <pgsql (AT) phoe (DOT) frmug.org> writes: When updating a NULL cell which is an array of something, setting an adressed member of a non existent array, the value of the cell is not changed. Assigning to a member of a NULL array has always yielded another NULL array. While I've never been particularly satisfied with that behavior either, it has some logical symmetry to it. What do you think the behavior ought to be? (In particular, if a non-null array should result, where do we get its dimensions and subscripts from?) |
#4
| |||
| |||
|
|
Assigning to a member of a NULL array has always yielded another NULL array. While I've never been particularly satisfied with that behavior either, it has some logical symmetry to it. What do you think the behavior ought to be? (In particular, if a non-null array should result, where do we get its dimensions and subscripts from?) |
![]() |
| Thread Tools | |
| Display Modes | |
| |