Re: Import: empty string and expression

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Import: empty string and expression
Дата
Msg-id 937d27e10902260106k66899f6en43f1f8a8db778011@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Import: empty string and expression  (Quan Zongliang <quanzongliang@gmail.com>)
Ответы Re: Import: empty string and expression  (Quan Zongliang <quanzongliang@gmail.com>)
Список pgadmin-hackers
On Thu, Feb 26, 2009 at 6:30 AM, Quan Zongliang <quanzongliang@gmail.com> wrote:

> 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"

No, I think we should just use:

5,,6 = 5, NULL, 6

and

5,'',6 = 5, EMPTY STRING, 6

> How about other types? boolean, integer, float, and so on.

Well they don't have an 'empty' value anyway, so no value would always
equal NULL.

> 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)

Have a set  of radio buttons and a textbox perhaps:

NULL AS:  NULL  O   empty string O    constant   O    [                ]


> 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.

NULL AS:  NULL  O    constant   O    [                ]

I wouldn't bother with ERROR for any type - let the server detect
errors and reject data accordingly.

> Until now, I have no idea with array type.

I wouldn't worry about those yet. Let's learn to walk first, and fly later :-)

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

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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: Import: empty string and expression
Следующее
От: Quan Zongliang
Дата:
Сообщение: Re: Import: empty string and expression