pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Change of data type
5+ messages / 5 participants
[nested] [flat]

* Change of data type
@ 2006-08-07 17:38 Judith <jaltamirano@correolux.com.mx>
  2006-08-07 20:43 ` Re: Change of data type jason nordwick <jason@adapt.com>
  2006-08-07 20:45 ` Re: Change of data type Kumar Dev <kumardb2@gmail.com>
  2006-08-08 11:51 ` Re: Change of data type Roman Neuhauser <neuhauser@sigpipe.cz>
  0 siblings, 3 replies; 5+ messages in thread

From: Judith @ 2006-08-07 17:38 UTC (permalink / raw)
  To: pgsql-sql

    Hello everybody, excuse me how can I change de data type of a field, 
I currently have:
   
    material character(30)  

    but I now want the field in text type like this:
  
    material  text

    somebody knows if ALTER TABLE has some option to do this?, or How 
can I do that?




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Change of data type
  2006-08-07 17:38 Change of data type Judith <jaltamirano@correolux.com.mx>
@ 2006-08-07 20:43 ` jason nordwick <jason@adapt.com>
  2 siblings, 0 replies; 5+ messages in thread

From: jason nordwick @ 2006-08-07 20:43 UTC (permalink / raw)
  To: Judith <jaltamirano@correolux.com.mx>; +Cc: pgsql-sql

On pg8, to change tab.col to type t:

  alter table tab alter column col type t

so:
  alter table tab alter column material type text

-j


Judith wrote:

>    Hello everybody, excuse me how can I change de data type of a 
> field, I currently have:
>      material character(30) 
>    but I now want the field in text type like this:
>  
>    material  text
>
>    somebody knows if ALTER TABLE has some option to do this?, or How 
> can I do that?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Change of data type
  2006-08-07 17:38 Change of data type Judith <jaltamirano@correolux.com.mx>
@ 2006-08-07 20:45 ` Kumar Dev <kumardb2@gmail.com>
  2006-08-10 19:49   ` Re: Change of data type Shoaib Mir <shoaibmir@gmail.com>
  2 siblings, 1 reply; 5+ messages in thread

From: Kumar Dev @ 2006-08-07 20:45 UTC (permalink / raw)
  To: Judith <jaltamirano@correolux.com.mx>; +Cc: pgsql-sql

Use Alter table notebook from control center
right click on the table and open alter table notebook
you can drop a column or add a column or change the datatype

Kumar


On 8/7/06, Judith <jaltamirano@correolux.com.mx> wrote:
>
>    Hello everybody, excuse me how can I change de data type of a field,
> I currently have:
>
>    material character(30)
>
>    but I now want the field in text type like this:
>
>    material  text
>
>    somebody knows if ALTER TABLE has some option to do this?, or How
> can I do that?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>



-- 
Kumar
DB2 DBA & SAP Basis professional

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Change of data type
  2006-08-07 17:38 Change of data type Judith <jaltamirano@correolux.com.mx>
  2006-08-07 20:45 ` Re: Change of data type Kumar Dev <kumardb2@gmail.com>
@ 2006-08-10 19:49   ` Shoaib Mir <shoaibmir@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Shoaib Mir @ 2006-08-10 19:49 UTC (permalink / raw)
  To: Kumar Dev <kumardb2@gmail.com>; +Cc: Judith <jaltamirano@correolux.com.mx>; pgsql-sql

You can do the following:

ALTER TABLE table-name ALTER colum-name TYPE text;


Thanks,
-- 
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)



On 8/8/06, Kumar Dev <kumardb2@gmail.com> wrote:
>
> Use Alter table notebook from control center
> right click on the table and open alter table notebook
> you can drop a column or add a column or change the datatype
>
> Kumar
>
>
> On 8/7/06, Judith <jaltamirano@correolux.com.mx> wrote:
> >
> >    Hello everybody, excuse me how can I change de data type of a field,
> > I currently have:
> >
> >    material character(30)
> >
> >    but I now want the field in text type like this:
> >
> >    material  text
> >
> >    somebody knows if ALTER TABLE has some option to do this?, or How
> > can I do that?
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> >
> > TIP 1: if posting/reading through Usenet, please send an appropriate
> >       subscribe-nomail command to majordomo@postgresql.org so that your
> >       message can get through to the mailing list cleanly
> >
>
>
>
> --
> Kumar
> DB2 DBA & SAP Basis professional
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Change of data type
  2006-08-07 17:38 Change of data type Judith <jaltamirano@correolux.com.mx>
@ 2006-08-08 11:51 ` Roman Neuhauser <neuhauser@sigpipe.cz>
  2 siblings, 0 replies; 5+ messages in thread

From: Roman Neuhauser @ 2006-08-08 11:51 UTC (permalink / raw)
  To: Judith <jaltamirano@correolux.com.mx>; +Cc: pgsql-sql

# jaltamirano@correolux.com.mx / 2006-08-07 12:38:20 -0500:
>    Hello everybody, excuse me how can I change de data type of a field, 
> I currently have:
>   
>    material character(30)  
> 
>    but I now want the field in text type like this:
>  
>    material  text
> 
>    somebody knows if ALTER TABLE has some option to do this?, or How 
> can I do that?

    http://www.postgresql.org/docs/8.1/static/sql-altertable.html

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2006-08-10 19:49 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-08-07 17:38 Change of data type Judith <jaltamirano@correolux.com.mx>
2006-08-07 20:43 ` jason nordwick <jason@adapt.com>
2006-08-07 20:45 ` Kumar Dev <kumardb2@gmail.com>
2006-08-10 19:49   ` Shoaib Mir <shoaibmir@gmail.com>
2006-08-08 11:51 ` Roman Neuhauser <neuhauser@sigpipe.cz>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox