=?UTF-8?Q?Torsten_F=C3=B6rtsch?= writes:
> we have a large table and want to change the type of one column
> from NUMERIC(14,4) to NUMERIC(24,12). If the new type is just NUMERIC
> without any boundaries, the operation is fast. If (24,12) is specified, it
> takes ages.
> I think it takes so long
I found that myself. But ...
postgres=# create table x(n14_4 NUMERIC(14,4), n24_12 NUMERIC(24,12), n
NUMERIC);
CREATE TABLE
postgres=# insert into x select i+.4, i+.12, i+.5234543 from
generate_series(1,100) i;
INSERT 0 100
postgres=# select * from x order by n limit 5;
n14_4 | n24_12
Torsten Förtsch wrote:
> we have a large table and want to change the type of one column from
> NUMERIC(14,4) to NUMERIC(24,12).
> If the new type is just NUMERIC without any boundaries, the operation is
> fast. If (24,12) is
> specified, it takes ages.
>
> I think it takes so long because the d
On Tue, 18 Jan 2005, Vladimir S. Petukhov wrote:
Hi!
Sorry for my English..
I want to dinamcly change type of column. If possible, of course.Trivial idia -
create new temporary column, try to write value from old columt to temporarity
(if type conersion ok - this made using select/update command
On Tue, Jan 18, 2005 at 07:01:45PM +, Vladimir S. Petukhov wrote:
> I want to dinamcly change type of column. If possible, of course.
The FAQ discusses this:
http://www.postgresql.org/files/documentation/faqs/FAQ.html#4.4
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---