Re: A couple of newbie questions ... - Mailing list pgsql-general

From Shane Ambler
Subject Re: A couple of newbie questions ...
Date
Msg-id 4887558C.8060405@Sheeky.Biz
Whole thread Raw
In response to Re: A couple of newbie questions ...  (Craig Ringer <craig@postnewspapers.com.au>)
Responses Re: A couple of newbie questions ...
List pgsql-general
Craig Ringer wrote:

> INSERT INTO table (fld_y,fld_z) VALUES ('y','z')
>
> which is really doing:
>
> INSERT INTO table (fld_x, fld_y,fld_z) VALUES (DEFAULT, 'y','z')
>

To be honest I hadn't seen the use of INSERT INTO table (fld_x,
fld_y,fld_z) VALUES (DEFAULT, 'y','z') before, I have always gone with
INSERT INTO table (fld_x, fld_y,fld_z) VALUES (NULL, 'y','z')

is DEFAULT a better option than using NULL? or is it just a preference
to spell out the implied default entry?

I've only used DEFAULT in CREATE TABLE(...)


--

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @ http://Sheeky.Biz

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



pgsql-general by date:

Previous
From: isaiah82@gmail.com
Date:
Subject: PANIC: could not write to log file 0
Next
From: "Murat Tasan"
Date:
Subject: psql \dt and identical table names across multiple schemas