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 по дате отправления: