pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
To: Beth Gatewood <beth@vizxlabs.com>
To: pgsql-sql@postgresql.org
Subject: Re: what is the difference between default 0 vs default '0'
Date: Wed, 26 Jun 2002 14:46:32 +0800
Message-ID: <020601c21cdd$36128a10$0200a8c0@SOL> (raw)
References: <000c01c21cab$c2f35ef0$6901a8c0@bethvizx>

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






view thread (3+ messages)

Message-ID: <020601c21cdd$36128a10$0200a8c0@SOL>
Permalink:  ../020601c21cdd$36128a10$0200a8c0@SOL/
Also on:    postgresql.org/message-id/020601c21cdd$36128a10$0200a8c0@SOL

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: chriskl@familyhealth.com.au, beth@vizxlabs.com
  Subject: Re: what is the difference between default 0 vs default '0'
  In-Reply-To: <020601c21cdd$36128a10$0200a8c0@SOL>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox