pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steve Frampton <frampton@LinuxNinja.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Doing a regexp-based search/replace?
Date: Thu, 18 Oct 2001 14:52:46 -0400
Message-ID: <25088.1003431166@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.33.0110181156220.29176-100000@astro.phpwebhosting.com>
References: <Pine.LNX.4.33.0110181156220.29176-100000@astro.phpwebhosting.com>

Steve Frampton <frampton@LinuxNinja.com> writes:
> If this were a text file, I would use a sed expression such as:
> cat textfile | sed 's/-.*$//'
> I've been looking for a way to do this with PostgreSQL but so far haven't
> found a function that seems to be suitable.

Write a function in pltcl or plperl, either of which can mash text
strings with ease and abandon ...

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <25088.1003431166@sss.pgh.pa.us>
Permalink:  ../25088.1003431166@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25088.1003431166@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, frampton@LinuxNinja.com
  Subject: Re: Doing a regexp-based search/replace?
  In-Reply-To: <25088.1003431166@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox