Re: what is the difference between default 0 vs default '0' - Mailing list pgsql-sql

From Christopher Kings-Lynne
Subject Re: what is the difference between default 0 vs default '0'
Date
Msg-id 020601c21cdd$36128a10$0200a8c0@SOL
Whole thread Raw
In response to what is the difference between default 0 vs default '0'  ("Beth Gatewood" <beth@vizxlabs.com>)
List pgsql-sql
Hi Beth,

I wouldn't have thought there'd be any difference to you, the user.

If you used 0, then that is an integer and that will be the default.  If you
used '0' then that is a character or string and it will automatically be
cast into an integer when used as a default.

Chris

----- Original Message -----
From: "Beth Gatewood" <beth@vizxlabs.com>
To: <pgsql-sql@postgresql.org>
Sent: Wednesday, June 26, 2002 8:52 AM
Subject: [SQL] what is the difference between default 0 vs default '0'


> all-
> Could somebody tell me why I would use default 0 vs default '0' in the
> following....
> CREATE TABLE foo (col1 INTEGER default 0) <-- or default '0'
>
> Thanks-
> Beth
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
>





pgsql-sql by date:

Previous
From: "Beth Gatewood"
Date:
Subject: what is the difference between default 0 vs default '0'
Next
From: "Ian Cass"
Date:
Subject: Quickest way to insert unique records?