Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ubkFb-004iF1-SU for pgsql-general@arkaria.postgresql.org; Tue, 15 Jul 2025 18:19:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1ubkFZ-004RGD-SA for pgsql-general@arkaria.postgresql.org; Tue, 15 Jul 2025 18:19:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ubkFZ-004RG5-HO for pgsql-general@lists.postgresql.org; Tue, 15 Jul 2025 18:19:34 +0000 Received: from mail-wm1-f52.google.com ([209.85.128.52]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1ubkFX-007vAz-2j for pgsql-general@postgresql.org; Tue, 15 Jul 2025 18:19:33 +0000 Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4561ed868b5so16886315e9.0 for ; Tue, 15 Jul 2025 11:19:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752603570; x=1753208370; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=boMx/x+nonpgo3UHGIxoNoPBvgn+j3rjgPyq8XyhMp8=; b=KTl1BfdiyOvv5Q7QfB5SMyOlOmZu57AhM6/nFLlHeoCSsol595Mo17rArRnZLRAsXq juBvA1Cyu1Jg8W3Cj+dFs2joJ1yFdaLnQkBnjO/2ExLxQb0mJr1baO6vn7s/n3rq9a9Y kK/iXC7P2U2s069KKsLpD9SFJuXSwhaKSes5sS2BoEFT7IS4LvYK5wl3jVkdRr371887 RU40rc7bpPlCMf+Chvh4XppP+Hc2RpRTEX5MTVops81o0aaPAS6Kneft4uDF0VJfH9zr 0QmVPGwfmgSw1FgoU/CiLl3wT01eddnek5eedRuRTzYJtbEUXykCiOoJIFrhWwDgc6Tt wyVQ== X-Gm-Message-State: AOJu0Ywdk8pS1+mKPI0Zvs1/joEGckSayvRVROqP9EwQ1yJyrR35Ql1S bk1u653dNba1oWKElBProDfCAxlhFSfEsgVZ7QQyzBXh+fHVI0sbV9NNlf5ZJ2hq2/Y1ZWub01L 6Aff6NSwKTjM6dr3ojYdpkP3fxJBGTnhww82e0Vq9SA== X-Gm-Gg: ASbGncsHqJSKjnX0CmMRly/NAikKmTOTDpOmKw7AuXXu7NHjtjNQxnaEMOH/bvF/8i5 V14aiG23qnniV3orZiXnYXpnMAmRF17ijgtiTcwHAsal2A4MQmIRI+y820QyP0CLw8+3+rve8zz 7tyAZa2c4fRp4nAH1BlcktiqrhaNi7XgrZv3lfUGyDfc+IXMdPUJVrwSAuzLG+LKr1H1GfVS+D3 OjUvIyk X-Google-Smtp-Source: AGHT+IHHfBCi76QpnVWuhVAn9e98HRp9i1a8Xhg7LMQKdRd/8xeqG6Nn1vUP1PaSPyPrGWEZAEz+0yzyYcSXiO2SqkM= X-Received: by 2002:a05:600c:3ba5:b0:456:2bd9:5126 with SMTP id 5b1f17b1804b1-4562bd95596mr13453665e9.16.1752603570260; Tue, 15 Jul 2025 11:19:30 -0700 (PDT) MIME-Version: 1.0 References: <8f5b6f90-cbb7-bffc-c15-134dcc6bce4@appl-ecosys.com> In-Reply-To: <8f5b6f90-cbb7-bffc-c15-134dcc6bce4@appl-ecosys.com> From: Thom Brown Date: Tue, 15 Jul 2025 19:19:18 +0100 X-Gm-Features: Ac12FXx0MG3dM-37FTrDdJhdmQZMRlHtDjZT2NkDBJpC07xsRtjTCzgF6OI1aEg Message-ID: Subject: Re: Removing terminal period from varchar string in table column To: Rich Shepard Cc: PGSQL Mailing List Content-Type: multipart/alternative; boundary="0000000000003cd28e0639fbd1e0" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000003cd28e0639fbd1e0 Content-Type: text/plain; charset="UTF-8" On Tue, 15 Jul 2025, 18:59 Rich Shepard, 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 > --0000000000003cd28e0639fbd1e0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


--0000000000003cd28e0639fbd1e0--