Re: Happy column adding

Поиск
Список
Период
Сортировка
Искать
От
Peter Eisentraut
Тема
Re: Happy column adding
Дата
Msg-id
Pine.LNX.4.21.0001261539580.416-100000@localhost.localdomain
Ответ на
Список
Дерево обсуждения
Happy column dropping Peter Eisentraut <peter_e@gmx.net>
Re: [HACKERS] Happy column dropping Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] Happy column dropping Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] Happy column dropping Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Happy column dropping Don Baccus <dhogaza@pacifier.com>
Re: [HACKERS] Happy column dropping Peter Eisentraut <peter_e@gmx.net>
Re: [HACKERS] Happy column dropping Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] Happy column dropping Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Happy column dropping The Hermit Hacker <scrappy@hub.org>
Re: [HACKERS] Happy column dropping Vince Vielhaber <vev@michvhf.com>
Re: [HACKERS] Happy column dropping Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Happy column dropping Peter Eisentraut <peter_e@gmx.net>
Re: [HACKERS] Happy column dropping Peter Eisentraut <peter_e@gmx.net>
Re: [HACKERS] Happy column dropping Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Happy column dropping The Hermit Hacker <scrappy@hub.org>
Re: [HACKERS] Happy column dropping Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] Happy column dropping Don Baccus <dhogaza@pacifier.com>
Re: [HACKERS] Happy column dropping Tom Lane <tgl@sss.pgh.pa.us>
RE: [HACKERS] Happy column dropping "Hiroshi Inoue" <Inoue@tpf.co.jp>
RE: [HACKERS] Happy column dropping Peter Eisentraut <peter_e@gmx.net>
RE: [HACKERS] Happy column dropping "Hiroshi Inoue" <Inoue@tpf.co.jp>
Re: [HACKERS] Happy column dropping Tom Lane <tgl@sss.pgh.pa.us>
RE: [HACKERS] Happy column dropping "Hiroshi Inoue" <Inoue@tpf.co.jp>
Re: [HACKERS] Happy column dropping Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Happy column dropping Don Baccus <dhogaza@pacifier.com>
RE: [HACKERS] Happy column dropping "Hiroshi Inoue" <Inoue@tpf.co.jp>
RE: [HACKERS] Happy column dropping Don Baccus <dhogaza@pacifier.com>
Re: [HACKERS] Happy column dropping Tom Lane <tgl@sss.pgh.pa.us>
RE: [HACKERS] Happy column dropping "Hiroshi Inoue" <Inoue@tpf.co.jp>
Re: [HACKERS] Happy column dropping Don Baccus <dhogaza@pacifier.com>
Re: [HACKERS] Happy column dropping Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Happy column dropping Don Baccus <dhogaza@pacifier.com>
Oh btw, about XXX Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Oh btw, about XXX Alfred Perlstein <bright@wintelcom.net>
Re: [HACKERS] Happy column dropping Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] Happy column dropping Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Happy column dropping Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] Happy column dropping Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Happy column dropping Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] Happy column dropping Peter Eisentraut <e99re41@DoCS.UU.SE>
Re: [HACKERS] Happy column dropping Bruce Momjian <pgman@candle.pha.pa.us>
Re: [HACKERS] Happy column dropping "Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>
Re: [HACKERS] Happy column dropping Brian E Gallew <geek+@cmu.edu>
Re: [HACKERS] Happy column dropping The Hermit Hacker <scrappy@hub.org>
Re: [HACKERS] Happy column dropping Peter Eisentraut <e99re41@DoCS.UU.SE>
Re: [HACKERS] Happy column dropping The Hermit Hacker <scrappy@hub.org>
On 2000-01-25, Tom Lane mentioned:

> > IIRC,there were some reason that default for new column had been rejected.
> 
> Well, yeah: wouldn't you expect that "ADD COLUMN x DEFAULT 42" would
> cause every row currently existing in the table to acquire x = 42,

Sure. But whatever happened to
pg_exec_query_dest("update  set  = ")

This is what users would have to execute anyway, right?

Look at this:

=> create table test1 (a text);
=> insert into test1 values ('blah');
=> insert into test1 values ('blah');
=> insert into test1 values ('blah');
=> alter table test1 add column b serial;
=> select * from test1; a   | b
------+---blah | 1blah | 2blah | 3
(3 rows)

Not good?

> rather than x = NULL?  In fact that would *have* to happen to allow
> constraints to be added; consider ADD COLUMN x DEFAULT 42 NOT NULL.

Or how about (continuing the above):

=> alter table test1 add column c int not null;
ERROR:  ALTER TABLE: adding NOT NULL attribute to non-empty table requires
a non-NULL default value       

> The only way to make that happen is for ADD COLUMN to switch over to
> an implementation that rewrites all the tuples.  Which I think is the
> right way to go ... but per this discussion, it's not a trivial fix.

So what's the above doing? Seriously, is there silently creeping heap
corruption I'm not seeing?

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



В списке pgsql-hackers по дате отправления
От: Peter Eisentraut
Дата:
От: Peter Eisentraut
Дата:
FAQ