Bug: COPY IN doesn't test domain constraints

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Rod Taylor <rbt(at)rbt(dot)ca>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Bug: COPY IN doesn't test domain constraints
Date: 2002-09-16 21:54:00
Message-ID: 2438.1032213240@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2002-09-16 23:08:35 Re: directional marks
Previous Message Ericson Smith 2002-09-16 21:01:29 Re: Physical sites handling large data

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2002-09-17 00:45:33 Re: Bug #758: show_planner_stats does not work for new PREPARE calls
Previous Message Rod Taylor 2002-09-16 15:10:05 Re: Doc patch