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 1j1shw-00048H-7w for pgsql-general@arkaria.postgresql.org; Wed, 12 Feb 2020 14:09:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j1shu-0004kJ-So for pgsql-general@arkaria.postgresql.org; Wed, 12 Feb 2020 14:09:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j1shu-0004jI-C7 for pgsql-general@lists.postgresql.org; Wed, 12 Feb 2020 14:09:38 +0000 Received: from 024-182-127-154.biz.spectrum.com ([24.182.127.154] helo=mail.brookhurstdata.net) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1j1shm-00005Q-Vg for pgsql-general@lists.postgresql.org; Wed, 12 Feb 2020 14:09:37 +0000 Received: from mail.brookhurstdata.net (mail.brookhurstdata.net [10.1.5.12]) by mail.brookhurstdata.net (Postfix) with ESMTP id C41A888901D for ; Wed, 12 Feb 2020 08:09:28 -0600 (CST) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_1cbf9bc8bf9471c237aa66818239a084" Date: Wed, 12 Feb 2020 08:09:28 -0600 From: Susan Hurst To: pgsql-general@lists.postgresql.org Subject: Re: Help : Removal of leading spaces in all the columns of a table Organization: Brookhurst Data LLC Reply-To: susan.hurst@brookhurstdata.com Mail-Reply-To: susan.hurst@brookhurstdata.com In-Reply-To: <20200212124246.3340.qmail@f4mail-235-121.rediffmail.com> References: <20200212124246.3340.qmail@f4mail-235-121.rediffmail.com> Message-ID: <63f2ef022e503f62aaefb798e4bd6a7e@mail.brookhurstdata.net> X-Sender: susan.hurst@brookhurstdata.com User-Agent: Roundcube Webmail/RCMAIL_VERSION List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=_1cbf9bc8bf9471c237aa66818239a084 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=UTF-8 I once wrote a trigger function to do just what you asked, however, it was a huge drain on performance so I didn't use it for long, so I dropped the trigger. Hopefully, someone has a more practical approach. I would be interested in this also. Sue --- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Susan E Hurst Principal Consultant Brookhurst Data LLC Email: susan.hurst@brookhurstdata.com Mobile: 314-486-3261 On 2020-02-12 06:42, srikkanth wrote: > Hi Team, > > How can i write the syntax to remove the leading spaces on a table for all the columns. > > Also, want to know how to do the all words of all the columns in capital along with removing of leadingexcessivetrailing spaces at a time. > > Can you please help me out, let me know in case of any inputs. > > Thanks, > > Srikanth B --=_1cbf9bc8bf9471c237aa66818239a084 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8

I once wrote a trigger function to do just what you asked, however, it w= as a huge drain on performance so I didn't use it for long, so I dropped th= e trigger.  Hopefully, someone has a more practical approach.  I = would be interested in this also.

Sue

---
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Susan E Hurst Principal Consultant Brookhurst Data LLC Email: susan.hurst@brookhurstdata.com Mobile: 314-486-3261

On 2020-02-12 06:42, srikkanth wrote:

Hi Team,

 

How can i write the s= yntax to remove the leading spaces on a table for all the columns.

 

Also, want to know ho= w to do the all words of all the columns in capital along with removing of = leading\excessive\trailing spaces at a time.

Can you please help= me out, let me know in case of any inputs.

 

Thanks,

Srikanth B

--=_1cbf9bc8bf9471c237aa66818239a084--