Re: Removing terminal period from varchar string in table column

From: Thom Brown <thom(at)linux(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
Cc: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Removing terminal period from varchar string in table column
Date: 2025-07-15 18:19:18
Message-ID: CAA-aLv65ZezBo8AM29dPJK6-THmqMsfr2WdiETbwag29DmhQnQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 15 Jul 2025, 18:59 Rich Shepard, <rshepard(at)appl-ecosys(dot)com> wrote:

> On Tue, 15 Jul 2025, Thom Brown wrote:
>
> > There are various options, but perhaps just use rtrim.
> > rtrim(company_name, '.')
>
> Thom,
>
> I looked at rtrim() but didn't see where to specify the table name. Would
> it
> be `select * from table companies rtrim(company_name, '.')'?
>

UPDATE companies
SET company_name = rtrim(company_name, '.')
WHERE company_name != rtrim(company_name, '.');

Thom

>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2025-07-15 20:15:11 Re: Removing terminal period from varchar string in table column
Previous Message DINESH NAIR 2025-07-15 18:13:44 Re: Query regarding support of test_decoding and PGReplicationStream with Standby Logical Replication