Re: Is this a bug in the table definition or in PostgreSQL?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is this a bug in the table definition or in PostgreSQL?
Дата
Msg-id 24209.957462132@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Is this a bug in the table definition or in PostgreSQL?  ("Oliver Elphick" <olly@lfix.co.uk>)
Список pgsql-hackers
"Oliver Elphick" <olly@lfix.co.uk> writes:
> The complicated constraint in this definition of the product table doesn't
> work, but should it?  or is there a better way to do this?
>    ...
>    CONSTRAINT ean CHECK (
>          CASE WHEN eancode IS NULL OR brand IS NULL
>                    THEN 't'
>                    ELSE ean_checkdigit(
>                        (SELECT ean_prefix
>                           FROM brandname
>                           WHERE brandname.id = brand
>                        ), eancode)
>          END
>       )

> copy product from '/rover/avoca/dumps/dbdump.product'
> ERROR:  copy: line 2, ExecEvalExpr: unknown expression type 108
> [line 1 had null values in the relevant fields]

108 ... (checks nodes.h) ... SubLink ... looks like your sub-select
isn't getting processed properly.  I'd say it's a bug, but it's
probably too late to fix it for 7.0.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 7.0RC2 compile error !
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_group_name_index corrupt?