Tagged Questions
1
vote
3answers
86 views
Altering same table across multiple databases
I have multiple databases on the same instance and I am in the process of updating a table schema that must propagate across all the databases.
I am not sure I know what the right procedure for this ...
3
votes
5answers
1k views
Alter table on live production databases
How do most "popular" (MySQL, Postgres...) database system handle altering tables on live production databases (like adding, deleting or changing the type of colums)?
I know the correct way is to ...
5
votes
5answers
697 views
Altering table schema takes too much time
I am using PostgreSQL database.
I have a table with millions of rows. I have a varchar column with 2000 size and i want to make it to 4000. I ran the alter table command, but it is taking too much ...
2
votes
1answer
802 views
I need to run VACUUM FULL with no available disk space
I have one table that is taking up close to 90% of hd space on our server. I have decided to drop a few columns to free up space. But I need to return the space to the OS. The problem, though, is ...
2
votes
1answer
371 views
Rotate a table in PostgreSQL
Problem description
I need to rotate (with DROP and CREATE) a table which is heavily used by other clients.
At present, I have a program which replaces (DROP + CREATE) this table.
Sometimes, just ...
3
votes
3answers
2k views
How to change the datatype of a column from integer to money?
I am attempting to convert a PostgreSQL table column from integer to money, but I am receiving the error:
cannot cast type MyColumn to money
I have tried these two statements, but just haven't ...
1
vote
1answer
616 views
How can I alter the type of a money-column to decimal in PostgreSQL?
I have a table in PostgreSQL where one column "vat" has type money but I would like to alter it to decimal instead.
How can I do it?
I tried with:
alter table my_table alter column vat type ...