Can't delete Null value from a not null field

Поиск
Список
Период
Сортировка
От Bryan White
Тема Can't delete Null value from a not null field
Дата
Msg-id 002c01bfc4f5$79396760$2dd260d1@arcamax.com
обсуждение исходный текст
Ответы Re: Can't delete Null value from a not null field  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I have a very simple table defined as
CREATE TABLE custlist (
        listid int4 NOT NULL,
        custid int4 NOT NULL);

Somehow a record has gotten into the table with both values null.  When I
try to delete using
    delete from custlist where custid is null;
or
    delete from custlist where listid is null;
I get the output:
    ERROR:  ExecutePlan: (junk) `ctid' is NULL!
I get the same error if I try to update the null row.

At this point I figured I would outsmart it and use the oid.  However it
appears the oid is null as well.

Any suggestions?  At this point the only thing I can see to do is dump the
table and run the dump through a filter for the bad record and then reload
it.

This is all being done on 6.5.3.

BTW the database is dumped and loaded onto a backup machine nightly.  The
load of this table is failing because of the null row.


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

Предыдущее
От: philip@adhesivemedia.com (Philip Hallstrom)
Дата:
Сообщение: Explain auth/access/priv system??
Следующее
От: Ron Peterson
Дата:
Сообщение: SQL Recursion