Re: Question about NOT NULL and default values.

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Tim Uckun <timuckun(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about NOT NULL and default values.
Date: 2008-10-17 04:01:39
Message-ID: 20081016205456.X48826@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 17 Oct 2008, Tim Uckun wrote:

> Is there a way to change this behavior so that an attempt to set the
> column to NULL will result in the default value being put in the
> field?

I don't think so specifically with default, but you could use a before
trigger instead that would put in a value in the new row if NULL was
given.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-10-17 04:02:33 Re: Question about fulltext search and to_tsvector function
Previous Message Tim Uckun 2008-10-17 03:58:44 Re: Question about NOT NULL and default values.