dbTalk Databases Forums  

[BUGS] BUG #1537: alter table statement

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1537: alter table statement in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
biju
 
Posts: n/a

Default [BUGS] BUG #1537: alter table statement - 03-13-2005 , 08:04 PM







The following bug has been logged online:

Bug reference: 1537
Logged by: biju
Email address: biju (AT) analytica-india (DOT) com
PostgreSQL version: 7.2.2
Operating system: linux-gnu
Description: alter table statement
Details:

i tried to execute alter table statement for a particular table. i did it
many ways, but not worked.
i tried with the same syntax given in the postgresql manual but in vain....
can u suggest anything abt this...


Thanks

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Reply With Quote
  #2  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: [BUGS] BUG #1537: alter table statement - 03-13-2005 , 11:03 PM






On Fri, Mar 11, 2005 at 11:12:07AM +0000, biju wrote:

Quote:
PostgreSQL version: 7.2.2
This version is pretty old -- if you must use 7.2, then consider
upgrading to 7.2.7. Better yet, try a newer release like 8.0.1.

Quote:
i tried to execute alter table statement for a particular table. i did it
many ways, but not worked.
Please show the exact statement you executed and describe how it
didn't work. If you got an error message, then please copy and
paste it verbatim. Without more information we can't tell you
what's wrong.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1537: alter table statement - 03-14-2005 , 12:57 AM



Michael Fuhr <mike (AT) fuhr (DOT) org> writes:
Quote:
On Fri, Mar 11, 2005 at 11:12:07AM +0000, biju wrote:
i tried to execute alter table statement for a particular table. i did it
many ways, but not worked.

Please show the exact statement you executed and describe how it
didn't work. If you got an error message, then please copy and
paste it verbatim. Without more information we can't tell you
what's wrong.
I'll make a side bet that he's reading post-7.2 documentation and
expecting every feature therein to be in 7.2 ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
  #4  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: [BUGS] BUG #1537: alter table statement - 03-14-2005 , 05:59 AM



On Mon, Mar 14, 2005 at 01:20:06PM +0530, Biju wrote:

Quote:
I am using postgresql version 7.2.2
As Tom observed, you might be reading documentation for a later
version and are trying to do something that 7.2 doesn't support.
Here's a link to the 7.2 documentation:

http://www.postgresql.org/docs/7.2/i...ive/index.html
http://www.postgresql.org/docs/7.2/i...ltertable.html

Quote:
I tried to conver the datatype of a field in a table say test. and the test
table say contains
one field testid of integer. I wanted it to convert it to say date datatype.
so i gave the query : alter table test alter testid date;
The ability to change a column's type with ALTER TABLE was added
in 8.0 (even so, the syntax you show is incorrect). Since you're
using 7.2, you'll have to use the method mentioned in the FAQ:

http://www.postgresql.org/docs/faqs.FAQ.html#4.3

However, you won't be able to cast the integer column directly to
date, so you'll have to use an expression that performs the desired
conversion.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.