On Fri, Oct 04, 2002 at 05:57:02PM -0400, Tom Lane wrote:
> Alvaro Herrera <[EMAIL PROTECTED]> writes:
> > I'm thinking about ALTER TABLE ... ADD COLUMN working properly when
> > child tables already contain the column.
> > There are two cases: one when specifying ALTER TABLE ONLY, and other
> > w
Alvaro Herrera <[EMAIL PROTECTED]> writes:
> I'm thinking about ALTER TABLE ... ADD COLUMN working properly when
> child tables already contain the column.
> There are two cases: one when specifying ALTER TABLE ONLY, and other
> when specifying recursive (not ONLY).
I think ALTER TABLE ONLY ... A
Hello hackers,
I'm thinking about ALTER TABLE ... ADD COLUMN working properly when
child tables already contain the column.
I have two proposals. First one:
There are two cases: one when specifying ALTER TABLE ONLY, and other
when specifying recursive (not ONLY).
In the first (ONLY) case, chi
Tom Lane wrote:
>
> Hiroshi Inoue <[EMAIL PROTECTED]> writes:
> > Christopher Kings-Lynne wrote:
> >> Just out of interest, is there a special reason it's difficult to implement
> >> the DEFAULT feature of alter table add column?
>
> > Without *DEFAULT* we don't have to touch the table file
> > a
Tom Lane writes:
> Besides, it seems to me there are cases where you don't really
> *want* the DEFAULT value to be used to fill the column, but something
> else (or even want NULLs).
Then you could use
ALTER TABLE t1 ADD COLUMN cn text;
ALTER TABLE t1 ALTER COLUMN cn SET DEFAULT 'what you reall
Hiroshi Inoue <[EMAIL PROTECTED]> writes:
> Christopher Kings-Lynne wrote:
>> Just out of interest, is there a special reason it's difficult to implement
>> the DEFAULT feature of alter table add column?
> Without *DEFAULT* we don't have to touch the table file
> at all. With *DEFAULT* we have to
> *ALTER TABLE* isn't as easy as *CREATE TABLE*.
> It has another problem because it hasn't implemented
> *DEFAULT* yet.
Just out of interest, is there a special reason it's difficult to implement
the DEFAULT feature of alter table add column?
Chris
---(end of broadcast
Christopher Kings-Lynne wrote:
>
> > *ALTER TABLE* isn't as easy as *CREATE TABLE*.
> > It has another problem because it hasn't implemented
> > *DEFAULT* yet.
>
> Just out of interest, is there a special reason it's difficult to implement
> the DEFAULT feature of alter table add column?
>
With
Tom Lane wrote:
>
> "Rod Taylor" <[EMAIL PROTECTED]> writes:
> > Running:
> > ALTER TABLE table ADD COLUMN column SERIAL;
> > Defines a column as int4 but does not create the sequence or attempt
> > to set the default value.
>
> Yeah ... SERIAL is implemented as a hack in the parsing of CREATE
> "Rod Taylor" <[EMAIL PROTECTED]> writes:
> > Running:
> > ALTER TABLE table ADD COLUMN column SERIAL;
> > Defines a column as int4 but does not create the sequence or attempt
> > to set the default value.
>
> Yeah ... SERIAL is implemented as a hack in the parsing of CREATE
> TABLE, but there
"Rod Taylor" <[EMAIL PROTECTED]> writes:
> Running:
> ALTER TABLE table ADD COLUMN column SERIAL;
> Defines a column as int4 but does not create the sequence or attempt
> to set the default value.
Yeah ... SERIAL is implemented as a hack in the parsing of CREATE
TABLE, but there's no correspond
Running:
ALTER TABLE table ADD COLUMN column SERIAL;
Defines a column as int4 but does not create the sequence or attempt
to set the default value.
Not a big deal, but I was surprised when the column values were null.
--
Rod Taylor
Your eyes are weary from staring at the CRT. You feel sleep
12 matches
Mail list logo