Skip site navigation (1) Skip section navigation (2)

Re: copy from

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Adam Lang <aalang(at)rutgersinsurance(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: copy from
Date: 2000-08-15 19:11:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql

On Tue, 15 Aug 2000, Adam Lang wrote:

> Gotcha. Now, if I do an insert and just don't specify that field at all, it
> will, use the default value, correct?  As long as I don't "touch" the field
> with anything it uses the default.

Right, as long as you don't specify the field in the column list.

There's a special case I should mention.  If you want to insert only
default values into all columns, the correct way is:
"insert into table default values" -- It usually doesn't come up,
but could if you had a table that was only a sequence value;

In response to

pgsql-sql by date

Next:From: Jesus AneirosDate: 2000-08-15 19:24:27
Subject: Re: Functions with Null Arguments?
Previous:From: Antoine ReidDate: 2000-08-15 19:03:49
Subject: Re: Use a rule or a transaction

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group