Обсуждение: boolean defaults

Поиск
Список
Период
Сортировка

boolean defaults

От
"Christopher Kings-Lynne"
Дата:
Hi,

Is it possible to get a default value on a boolean column to be anything
other than 't', 'f', true or false?

eg.  If I go 'default 3 > 1', that's resolved to default true.

I just need to know for phpPgAdmin...

Chris



Re: boolean defaults

От
"Christopher Kings-Lynne"
Дата:
Doh - forget I even asked that!  Setting default to something involving
current_time easily gives a variable default...

Chris

----- Original Message ----- 
From: "Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
To: "Hackers" <pgsql-hackers@postgresql.org>
Sent: Tuesday, August 05, 2003 9:46 AM
Subject: [HACKERS] boolean defaults


> Hi,
>
> Is it possible to get a default value on a boolean column to be anything
> other than 't', 'f', true or false?
>
> eg.  If I go 'default 3 > 1', that's resolved to default true.
>
> I just need to know for phpPgAdmin...
>
> Chris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>



Re: boolean defaults

От
Rod Taylor
Дата:
On Mon, 2003-08-04 at 21:46, Christopher Kings-Lynne wrote:
> Hi,
>
> Is it possible to get a default value on a boolean column to be anything
> other than 't', 'f', true or false?

NULL of course :)  1 or 0 also works.

And regardless of how hard MS Access tries, -1 is not true.