Re: How do I add/edit 'digit' property into PGAdmin4 ?

From: Shreeyansh Dba <shreeyansh2014(at)gmail(dot)com>
To: Karen Goh <karenworld(at)yahoo(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: How do I add/edit 'digit' property into PGAdmin4 ?
Date: 2019-07-18 16:12:18
Message-ID: CAGDYbUOzp1BQQO+Mi+cHKReG1FcOzWnnFFQZ9LjmJBL4f8kDnA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi Karen,

Use below query to change column type text to integer/numeric.

alter table <table_name> alter column <column_name> type int using
(column_name::int);
alter table <table_name> alter column <column_name> type numeric using
(column_name::numeric);

Hope this will help you.

Thanks & Regards,
*Shreeyansh DBA Team*
www.shreeyansh.com

On Thu, Jul 18, 2019 at 8:59 PM Karen Goh <karenworld(at)yahoo(dot)com> wrote:

> Hi all,
>
> I need help to change an existing column in my table from text to 'digit'
> type.
>
> However, I can't find any numeric or integer property type.
>
> The digit type should contains numbers only but it is not for
> calculation. It is a zipcode that has 6 digit numbers.
>
> Please let me know how do I alter the text type to digit type. If
> alteration is not possible, how do I add in the property into PGAdmin4
> which is running on windows 10.
>
> Thank you.
>
>
>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Scott Ribe 2019-07-18 17:12:53 Re: How do I add/edit 'digit' property into PGAdmin4 ?
Previous Message Karen Goh 2019-07-18 15:29:23 How do I add/edit 'digit' property into PGAdmin4 ?