Re: what is the difference between default 0 vs default '0'

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Beth Gatewood" <beth(at)vizxlabs(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: what is the difference between default 0 vs default '0'
Date: 2002-06-26 06:46:32
Message-ID: 020601c21cdd$36128a10$0200a8c0@SOL
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)vizxlabs(dot)com>
To: <pgsql-sql(at)postgresql(dot)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(at)postgresql(dot)org)
>
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Ian Cass 2002-06-26 10:12:49 Quickest way to insert unique records?
Previous Message Lee Harr 2002-06-26 02:35:28 Re: what is the difference between default 0 vs default '0'