Re: effective SELECT from child tables - Mailing list pgsql-hackers

From Greg Stark
Subject Re: effective SELECT from child tables
Date
Msg-id 871x34cwzs.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: effective SELECT from child tables  (Hannu Krosing <hannu@skype.net>)
Responses Re: effective SELECT from child tables
List pgsql-hackers
Hannu Krosing <hannu@skype.net> writes:

> I also often wish that this would be possible when someone adds a column
> with a default value to a multi-million row table on a 24/7 production
> system and insists on filling all existing columns with the default.
> 
> A rule "ON SELECT FROM table_x WHERE col_x IS NULL return
> col_x=default_for_col_x" would solve that nicely.

Of course that only works if the reason they want to set fill the rows with
the default value isn't precisely because NULL is a perfectly reasonable thing
for the column to have (but not what they want for the existing rows).

-- 
greg



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PERFORM] A Better External Sort?
Next
From: Thomas Hallgren
Date:
Subject: Re: Socket problem using beta2 on Windows-XP