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