pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Karen Goh <karenworld@yahoo.com>
To: Shreeyansh Dba <shreeyansh2014@gmail.com>
Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: How do I add/edit 'digit' property into PGAdmin4 ?
Date: Fri, 19 Jul 2019 11:46:41 +0000 (UTC)
Message-ID: <549903142.2203182.1563536801681@mail.yahoo.com> (raw)
In-Reply-To: <CAGDYbUOzp1BQQO+Mi+cHKReG1FcOzWnnFFQZ9LjmJBL4f8kDnA@mail.gmail.com>
References: <503592305.1895694.1563463763702@mail.yahoo.com>
	<CAGDYbUOzp1BQQO+Mi+cHKReG1FcOzWnnFFQZ9LjmJBL4f8kDnA@mail.gmail.com>

 Hi Shreeyansh,

Due to many mails in my inbox, I got to see your email only now.

I'd like to seek your help in terms of how to edit the data in this column that I want to change to numeric.

At one go?

So, in this column that I used the wrong property type - and now it contains CountryName + the 6 digit numbers.

Is there any way I can alter the data in that column at one go and remove the CountryName altogether?

I tried using pgAdmin4 but it is not working...:(
     On Friday, July 19, 2019, 12:14:04 AM GMT+8, Shreeyansh Dba <shreeyansh2014@gmail.com> wrote:  
 
 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@yahoo.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.



  

view thread (7+ messages)  latest in thread

Message-ID: <549903142.2203182.1563536801681@mail.yahoo.com>
Permalink:  ../549903142.2203182.1563536801681@mail.yahoo.com/
Also on:    postgresql.org/message-id/549903142.2203182.1563536801681@mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: karenworld@yahoo.com, shreeyansh2014@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: How do I add/edit 'digit' property into PGAdmin4 ?
  In-Reply-To: <549903142.2203182.1563536801681@mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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