Re: Import: empty string and expression

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Quan Zongliang <quanzongliang(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: Import: empty string and expression
Date: 2009-02-24 13:03:49
Message-ID: 937d27e10902240503k74cd8d31v674626b3929541f0@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Tue, Feb 24, 2009 at 9:23 AM, Quan Zongliang <quanzongliang(at)gmail(dot)com> wrote:
> Hi, all
>
> String:
> How to distinguish NULL and empty?
>
> In the COPY command, it conside no quoted empty as NULL and quoted ones as empty.
> This rule not defined in the CSV standard(RFC4180).
> For example:
>   A,,B  has three item: 'A', NULL and 'B'
>   A,"",B has three item: 'A', empty and 'B'
> Should we follow this rule?
> I think it is good.

Sounds good to me.

> Now, I use <column-name> style in the expression.
> The delimiter option use this style too. (<TAB> means TAB char.)
> Exscaped char is XML-style, &amp; &lt; and &gt; , and so on.

Why do we need to escape those characters? If I follow correctly, this
will be in an expression that the user enters themselves?

> Because I noticed pgAdmin has a option "Show NULL values as <NULL>".
> Is it appropriate?

For entering non-printable characters shouldn't we just accept
whatever PostgreSQL will? Or am I missing the point?

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message svn 2009-02-24 13:29:11 SVN Commit by dpage: r7608 - in trunk/pgadmin3/pgadmin: dlg include/schema schema
Previous Message Ashesh Vashi 2009-02-24 11:36:11 Re: PATCH: Update autovacuum (for TOAST-TABLE) to use reloptions, instead of a system catalog