Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hocUk-0004H9-0X for pgsql-admin@arkaria.postgresql.org; Fri, 19 Jul 2019 23:40:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hocUi-0001E4-F9 for pgsql-admin@arkaria.postgresql.org; Fri, 19 Jul 2019 23:40:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hocUh-0000wE-Ru for pgsql-admin@lists.postgresql.org; Fri, 19 Jul 2019 23:40:56 +0000 Received: from pb-smtp1.pobox.com ([64.147.108.70]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hocUc-00008z-Vb for pgsql-admin@lists.postgresql.org; Fri, 19 Jul 2019 23:40:53 +0000 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 3E463162E92 for ; Fri, 19 Jul 2019 19:40:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=date:from:to :subject:message-id:references:mime-version:content-type :in-reply-to; s=sasl; bh=qM5dZO8vFkJOEGqJziNjFWO8zMY=; b=B8l0HjF qTYJjOuyA02Xiz9nlCL0v0qVhckzo0Il5C/Ugg0v+n32K+iCAhftHdo7/1mWkfj9 pKDZ6HDeHilh66bDsWA9iBFs/Tg3zukvi07GKMIyv4WFwDEbYizZY+zUXdsw7lIX JaO+IY/xoydVkT0haIaIyAvScsFzvxWX6tZ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=date:from:to :subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=sasl; b=qoZNjt4QmgfK2uz22HG4IYvIKKl7rHctt 0Zj7Uc5PJU9QqGd1v0OoCqrKSAolg2knu//WQpqT2tHrBshXHqYsoTMq/mmn5gK9 9PblytRw84RcyeL5kyOZVnzWFLPo9xTm4Yk3uMa81zmb5CoKwCvVCoWFWYK+dowC ukaMT36WMU= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 33950162E91 for ; Fri, 19 Jul 2019 19:40:46 -0400 (EDT) Received: from lnxws01.localdomain (unknown [71.120.16.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id B8F6F162E90 for ; Fri, 19 Jul 2019 19:40:45 -0400 (EDT) Date: Fri, 19 Jul 2019 19:40:44 -0400 From: "Anthony E. Greene" To: pgsql-admin@lists.postgresql.org Subject: Re: How do I add/edit 'digit' property into PGAdmin4 ? Message-ID: <20190719234044.GA8328@lnxws01.localdomain> References: <503592305.1895694.1563463763702@mail.yahoo.com> <549903142.2203182.1563536801681@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <549903142.2203182.1563536801681@mail.yahoo.com> OpenPGP: id=7B3DBD7D7D911B44BA26C484A42A60DD6C94239D; url=http://www.greene-family.org/tony/pgp/0x6C94239D.asc; preference=signencrypt X-vCard: User-Agent: Mutt/1.12.0 (2019-05-25) X-Pobox-Relay-ID: A127F3F2-AA7E-11E9-B820-46F8B7964D18-14562987!pb-smtp1.pobox.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 19-Jul-2019/11:46 +0000, Karen Goh wrote: > 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? If the postal code is the last six characters, then this will do what you want: UPDATE mytable SET mycolumn=RIGHT(mycolumn,6) WHERE mycolumn ~ '[0-9]{6}$' TG -- Anthony E. Greene