Re: Removing terminal period from varchar string in table column

Thom Brown <thom@linux.com>

From: Thom Brown <thom@linux.com>
To: Rich Shepard <rshepard@appl-ecosys.com>
Cc: PGSQL Mailing List <pgsql-general@postgresql.org>
Date: 2025-07-15T18:19:18Z
Lists: 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

>