Skip site navigation (1) Skip section navigation (2)

psql \COPY accepts multiple NULL AS

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: psql \COPY accepts multiple NULL AS
Date: 2007-07-27 04:50:28
Message-ID: 20070727045028.GG4887@tamriel.snowman.net (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-patches
Greetings,

  psql seems to accept syntax which would be rejected by the server,
  which seems a bit odd:

  sfrost*=# \copy billing_data from ../BillingSamplePricerFile.csv
            with csv header quote as '"' null as 'abc' null as '123'
  ERROR:  invalid input syntax for integer: ""

  vs.

  sfrost=# copy billing_data from stdin 
           with csv header quote as '"' null as 'abc' null as '123';
  ERROR:  conflicting or redundant options

  Now, honestly, I'd like to see support for multiple 'NULL AS' strings,
  but till that's added it'd probably be best if psql error'd on this
  like the backend does rather than accepting it and then not doing it.

  	Thanks!

		Stephen

Responses

pgsql-bugs by date

Next:From: Siraj KhanDate: 2007-07-27 08:13:47
Subject: Help on clarification of supported platform for Postgres 8.2
Previous:From: Stephan SzaboDate: 2007-07-26 15:08:51
Subject: Re: bug with RE

pgsql-patches by date

Next:From: Tom LaneDate: 2007-07-27 04:51:56
Subject: Re: allow CSV quote in NULL
Previous:From: Stephen FrostDate: 2007-07-27 04:36:54
Subject: allow CSV quote in NULL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group