Re: Bug: COPY IN doesn't test domain constraints

Поиск
Список
Период
Сортировка
От Rod Taylor
Тема Re: Bug: COPY IN doesn't test domain constraints
Дата
Msg-id 1032275973.32170.9.camel@jester
обсуждение исходный текст
Ответы Re: Bug: COPY IN doesn't test domain constraints  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Bug: COPY IN doesn't test domain constraints  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
Fixed this problem and added regression tests in domain.sql.

Also:
- Changed header file order (alphabetical)
- Changed to m = attnum - 1 in binary copy code for consistency

On Mon, 2002-09-16 at 17:54, Tom Lane wrote:
> In CVS tip:
>
> regression=# create domain nnint int not null;
> CREATE DOMAIN
> regression=# create table foo (f1 nnint);
> CREATE TABLE
> regression=# insert into foo values(null);
> ERROR:  Domain nnint does not allow NULL values        -- okay
> regression=# \copy foo from stdin
> 123
> \N
> \.
> regression=# select * from foo;
>  f1
> -----
>  123
>                             -- not okay
> (2 rows)
>
> regression=# create domain vc4 varchar(4);
> CREATE DOMAIN
> regression=# create table foot (f1 vc4);
> CREATE TABLE
> regression=# \copy foot from stdin
> 1234567890
> \.
> regression=# select * from foot;
>      f1
> ------------
>  1234567890                        -- not okay
> (1 row)
>
>
>             regards, tom lane
>
--
  Rod Taylor

Вложения

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: earthdistance fixes, but no cube stuff
Следующее
От: Neil Conway
Дата:
Сообщение: trivial doc fix