Re: Import: empty string and expression

Поиск
Список
Период
Сортировка
От Quan Zongliang
Тема Re: Import: empty string and expression
Дата
Msg-id 20090226144315.2194.4125B4E5@gmail.com
обсуждение исходный текст
Ответ на Re: Import: empty string and expression  (Dave Page <dpage@pgadmin.org>)
Ответы Re: Import: empty string and expression  (Dave Page <dpage@pgadmin.org>)
Список 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@gmail.com
CIT Japan:  http://www.cit.co.jp
CIT China:  http://www.citbj.com.cn


В списке pgadmin-hackers по дате отправления:

Предыдущее
От: "Dickson S. Guedes"
Дата:
Сообщение: Re: Server Status window work
Следующее
От: "Dickson S. Guedes"
Дата:
Сообщение: Re: Server Status window work