Re: Removing terminal period from varchar string in table column - Mailing list pgsql-general

From Thom Brown
Subject Re: Removing terminal period from varchar string in table column
Date
Msg-id CAA-aLv65ZezBo8AM29dPJK6-THmqMsfr2WdiETbwag29DmhQnQ@mail.gmail.com
Whole thread Raw
In response to Re: Removing terminal period from varchar string in table column  (Rich Shepard <rshepard@appl-ecosys.com>)
Responses Re: Removing terminal period from varchar string in table column
List pgsql-general
On Tue, 15 Jul 2025, 18:59 Rich Shepard, <rshepard@appl-ecosys.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

pgsql-general by date:

Previous
From: "DINESH NAIR"
Date:
Subject: Re: Query regarding support of test_decoding and PGReplicationStream with Standby Logical Replication
Next
From: Rich Shepard
Date:
Subject: Re: Removing terminal period from varchar string in table column