By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,384 Members | 714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,384 IT Pros & Developers. It's quick & easy.

Cannot change column data type

P: 10
Hello

I have some problem to change my column data type in my table property from character(15) to character(100). I use Postgresql 7.4.
The problem is I try to make new column with charcater(100) then i copy the data from teh original column to the new column, then i try to drop the column but i get the following ERROR : Cannot drop table invention column invention_cite because the other objects depend on it.
Is any body can help me to solve this problem ?

bogie
Aug 30 '07 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 534
Hello
... ... ...
ERROR : Cannot drop table invention column invention_cite because the other objects depend on it.
The message says it all, you have some other objects that depend on this column.
Open the psql session and run
\d+ invention
The output of this command can give you an idea on what's involved.
Aug 30 '07 #2

P: 10
The message says it all, you have some other objects that depend on this column.
Open the psql session and run
\d+ invention
The output of this command can give you an idea on what's involved.

Hallo

Thankyou for replying my question, Continue with my problem : After I know the relation of the dependent object, what should i do to change my column data type in my table invention ?, Should I use the DROP ... CASCADE command to destroy the dependent object one by one ? and connected again to the new column after i drop the old column ?, or is there any other way, I mean an easy way to change my column data type without destroying the dependent object ?. Because the changes is not so significant but the effort to do this is so complicated. Can any body help me to solve this problem?.
Thank you very much in advance

Bogie
Sep 6 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.