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

Re: Plan for CSV handling of quotes, NULL

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>,Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: Plan for CSV handling of quotes, NULL
Date: 2004-04-15 04:52:35
Message-ID: 200404150452.i3F4qZo18976@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I found parse_coerce.c::TypeCategory(), which contains information about
> > which data type oids are in which grouping, e.g. DATETIME, STRING,
> > NUMERIC, etc.  It seems that function, if called with
> > pg_type.typbasetype could help determine if quotes should be used.
> 
> TypeCategory is a crock that should have been done away with long ago.
> We need to be working to eliminate it, not expand our dependency on it.

Ah, so do we have any other way to identify the type of field we are
using?  Particularly, how do we identify a numeric and dates?

If we don't find something, we have to push those decisions to the user,
which is kind of strange because deep down we must know this.

The only other thing we could do would be to add something to pg_type
that says whether it needs quotes.  Seems like overkill.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

In response to

Responses

pgsql-patches by date

Next:From: Andrew DunstanDate: 2004-04-15 05:00:22
Subject: Re: Plan for CSV handling of quotes, NULL
Previous:From: Tom LaneDate: 2004-04-15 04:47:14
Subject: Re: Plan for CSV handling of quotes, NULL

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