Re: How to convert a binary filed to an integer field?

From: Arjen Nienhuis <a(dot)g(dot)nienhuis(at)gmail(dot)com>
To: wei725(at)lycos(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to convert a binary filed to an integer field?
Date: 2010-08-26 11:56:09
Message-ID: AANLkTi=V-ODps60Y9Lz+L-JQsFakrvFyYE3Ly=i5qQKv@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Aug 25, 2010 at 9:29 PM, <wei725(at)lycos(dot)com> wrote:

> I have an application in the product. Now, one status field needs to have
> three statuses instead of two. How to make a such change in PostgreSQL?
>

ALTER TABLE product ALTER status TYPE int USING status::integer;

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gnanakumar 2010-08-26 12:14:26 Is TRUNCATE a DML statement?
Previous Message Vick Khera 2010-08-26 11:51:23 Re: Feature proposal