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

Re: Patch to bring \copy syntax more in line with SQL

From: Neil Conway <neilc(at)samurai(dot)com>
To: Bill Moran <wmoran(at)potentialtech(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Patch to bring \copy syntax more in line with SQL
Date: 2004-01-20 23:31:38
Message-ID: 87k73mi4dh.fsf@mailbox.samurai.com (view raw or flat)
Thread:
Lists: pgsql-patches
A few quick comments:

- don't use C++-style comments

- please update the documentation

- update the comment at the top of copy.c

Bill Moran <wmoran(at)potentialtech(dot)com> writes:
> Ideally, this should cover all cases of old and new syntax, except
> where "AS" is present.

ISTM it would be easy to allow for an optional 'AS' token following
the 'DELIMITER[S]' token.

> The only drawback I can see is that \copy is now more liberal in
> what it accepts, and may accept incomplete statements without
> issuing an error (i.e. a WITH or USING clause at the end of a \copy
> statement will simply be ignored, and no error generated)

Why can't you check for this?

-Neil


In response to

Responses

pgsql-patches by date

Next:From: Tom LaneDate: 2004-01-20 23:50:03
Subject: Re: Current-stream read for psql's \copy
Previous:From: Neil ConwayDate: 2004-01-20 23:17:32
Subject: Re: Patch for search_path --- apply to 7.4 branch?

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