Updating a table which is null doesn't work?

Поиск
Список
Период
Сортировка
От nolan@celery.tssi.com
Тема Updating a table which is null doesn't work?
Дата
Msg-id 20030501234537.32640.qmail@celery.tssi.com
обсуждение исходный текст
Ответы Re: Updating a table which is null doesn't work?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Create a table as follows:

    create table test_tbl (name varchar(3), item char(1)[])

Insert a row:

    insert into test_tbl values ('ABC',null);

Update a value in the array:

    update test_tbl set item[1] = 'Z';

Now do a select:

    select * from test_tbl;

What happened to the update?

It appears to be necessary to set the array to some non-null value
before it is possible to update any element in it.  This would appear
to be inconsistent with what happens when you update a non-arrayed column
that currently contains a null.
--
Mike Nolan


В списке pgsql-general по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Can views join tables from sub selects?
Следующее
От: Jean-Christian Imbeault
Дата:
Сообщение: Re: qsort (was Re: Solaris)