Removing terminal period from varchar string in table column

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Removing terminal period from varchar string in table column
Date: 2025-07-15 17:30:11
Message-ID: e2d8ddc1-49d7-40da-ef92-c4523371a63@appl-ecosys.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

I want to remove the terminal period '.' from the varchar strings in the
'company_name' column in all rows with that period in the companies table.

I've looked at trim(), translate(), "substr(company_name 1,
length(compan_name) - 1)", and a couple of other functions and am unsure how
best to do this without corrupting the database table.

Advice needed.

TIA,

Rich

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2025-07-15 17:32:42 Re: Performance of JSON type in postgres
Previous Message Greg Hennessy 2025-07-15 17:07:44 Re: optimizing number of workers