public inbox for [email protected]  
help / color / mirror / Atom feed
From: Amit Langote <[email protected]>
To: Tom Lane <[email protected]>
Cc: Postgres General <[email protected]>
Subject: Re: Table Rewrite During ALTER TABLE ... ADD COLUMN ... DEFAULT NULL
Date: Thu, 3 Apr 2014 13:26:45 +0900
Message-ID: <CA+HiwqGbTA1RNxngDYxeHQVr6zeu2vF30fK7z_bexg-KW+PYRw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CA+HiwqE35_+z0_gFw9mp=_0MLgPfb=+QY910LG7C-sBNTvqdgg@mail.gmail.com>
	<[email protected]>
	<CA+HiwqGzakcVbKbfxv6ThNcAmp_ZgakagKTM1u80PAF2mnNVcQ@mail.gmail.com>
	<[email protected]>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgsql-general>

On Thu, Apr 3, 2014 at 1:19 PM, Tom Lane <[email protected]> wrote:
> Amit Langote <[email protected]> writes:
>> On Thu, Apr 3, 2014 at 12:54 PM, Tom Lane <[email protected]> wrote:
>>> Some experimentation suggests that we are smart about "DEFAULT NULL"
>>> unless the column type requires a length-coercion cast, in which
>>> case the default expression involves a function call, and that doesn't
>>> get elided.
>
>> Is there a warning about such behavior in the manual?
>> Is it useful to include it somewhere (not sure where though)?
>
> We could just rephrase the ALTER TABLE docs to say that the table
> rewrite is avoided if you omit the DEFAULT clause, rather than
> saying that a null default works.
>

Agreed.

--
Amit


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



view thread (9+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Table Rewrite During ALTER TABLE ... ADD COLUMN ... DEFAULT NULL
  In-Reply-To: <CA+HiwqGbTA1RNxngDYxeHQVr6zeu2vF30fK7z_bexg-KW+PYRw@mail.gmail.com>

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

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