Re: [PATCHES] WITH DELIMITERS in COPY

From: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] WITH DELIMITERS in COPY
Date: 2002-03-05 10:21:58
Message-ID: Pine.LNX.4.21.0203052058060.18954-100000@linuxworld.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Hi Bruce,

On Tue, 5 Mar 2002, Bruce Momjian wrote:

>
> Seems the original title about "feature causes performance in COPY" was
> confusing.

Oops.

> This patch merely fixes the identified TODO item in the
> grammar about using WITH in COPY.

Now that I look at this patch again I don't think I like the
syntax.

COPY [BINARY] <relation> [WITH OIDS] TO | FROM <file> [[USING DELIMITERS |
WITH DELIMITER] <delimiter> [WITH NULL AS <char>]

It isn't very elegant.

1) I forced the parser to be able to handle multiple WITHs, but that
doesn't mean its right. I can't remember why I didn't propose a better
syntax back then, such as:

... [WITH [DELIMITER <delimiter>,] [NULL AS <char>]]

2) Given (1), Why does WITH OIDS belong where it is now? Why not have it
as an 'option' at the end?

Anyone have any opinion on this?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pa O'Clerigh 2002-03-05 11:26:46 Help Wanted for running C code
Previous Message info 2002-03-05 10:08:14 FW: Re: [JDBC] DB mirroring

Browse pgsql-patches by date

  From Date Subject
Next Message Thomas Lockhart 2002-03-05 13:44:47 Re: [PATCHES] new hash function
Previous Message Bruce Momjian 2002-03-05 06:50:22 Re: ALTER TABLE OWNER: change indexes