From: | Quan Zongliang <quanzongliang(at)gmail(dot)com> |
---|---|
To: | Dave Page <dpage(at)pgadmin(dot)org> |
Cc: | pgadmin-hackers(at)postgresql(dot)org |
Subject: | Re: Import: empty string and expression |
Date: | 2009-02-26 06:30:50 |
Message-ID: | 20090226144315.2194.4125B4E5@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
> > 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.
With the width-delimiter, user can set empty values by "5,,12" or "5,0,12".
Should we add NULL-value support? Like: "5,<NULL>,12"
How about other types? boolean, integer, float, and so on.
This is my idea:
For String, the user can select one chioce:
"empty" (generate "FORCE NOT NULL" option for COPY or '' for INSERT),
"NULL" (left nochange, for column nullable column)
"ERROR" (don't generate statement, log only).
"CONSTANT" (user-defined string)
All of them act on NULL.
For others:
"NULL" (left nochange)
"ERROR" (don't generate statement, log only).
"CONSTANT" (user-defined string) or
[other options depend on type]
All of them act on NULL or empty.
Until now, I have no idea with array type.
-----------------------------------------------
Quan Zongliang
quanzongliang(at)gmail(dot)com
CIT Japan: http://www.cit.co.jp
CIT China: http://www.citbj.com.cn
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2009-02-26 08:29:19 | Re: Server Status window work |
Previous Message | Dickson S. Guedes | 2009-02-26 05:19:11 | Re: Server Status window work |