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

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: (view raw, whole thread or download thread mbox)
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:

In response to


pgadmin-hackers by date

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

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