Re: changing data type

From: Thomas Good <tomg(at)q8(dot)nrnet(dot)org>
To: bmccoy(at)chapelperilous(dot)net
Cc: "D(dot) Duccini" <duccini(at)backpack(dot)com>, Chris <csmith(at)squiz(dot)net>, pgsql-novice(at)hub(dot)org
Subject: Re: changing data type
Date: 2000-10-19 15:34:33
Message-ID: Pine.LNX.3.96.1001019113002.7810A-100000@q8.nrnet.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, 19 Oct 2000 bmccoy(at)chapelperilous(dot)net wrote:

> On Thu, 19 Oct 2000, D. Duccini wrote:
>
> > can't do it (in 6.x)
> >
> > the best you can do is
> >
> > alter table rename column1 to oldcolumn1
> >
> > alter table add column1 attr type;
> >
> > then insert into it from the old one
> >
> > alternately, dump the data out, and reload into your new table
>
> Haven't you people read the online docs? There's an entire chapter
> (chapter 5 in the 'postgres' document), devoted to type conversion, not to
> mention a listing of type conversion functions (among others) in chapter 4
> of that same document.
>
> I hate answering inquires with just RTFM, but in this case, RTFM! :-)

As one of the people who agitated for the creation of a NOVICE list
back when - one of the original tenets was that no question was too
naive to be asked. And no answer of RTFM would ever be appropriate.
This was based on the FreeBSD newbies list model...

I realise that you are not terribly agitated here Brett but I would
gently remind you that everyone needs someone to say, 'oh yes, it's
on the end of your nose' - at least once in awhile (once a day in my
case. ;-)

Now back to tripping over my own blunders...

Cheers,
Tom
--------------------------------------------------------------------
SVCMC - Center for Behavioral Health
--------------------------------------------------------------------
Thomas Good tomg@ { admin | q8 } .nrnet.org
IS Coordinator / DBA Phone: 718-354-5528
Fax: 718-354-5056
--------------------------------------------------------------------
Powered by: PostgreSQL s l a c k w a r e FreeBSD:
RDBMS |---------- linux The Power To Serve
--------------------------------------------------------------------

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message bmccoy 2000-10-19 15:37:52 Re: changing data type
Previous Message D. Duccini 2000-10-19 15:18:06 Re: changing data type