Re: Split_part on a CR - Mailing list pgsql-general

From Gary Chambers
Subject Re: Split_part on a CR
Date
Msg-id alpine.DEB.2.02.1211191457210.10910@bail
Whole thread Raw
In response to Split_part on a CR  (Jeff Ross <jross@wykids.org>)
List pgsql-general
Jeff,

> I'm having a hard time figuring out how to use split_part with a carriage
> return (hex 0a) as the delimiter.  Would someone please offer me a clue?

0x0a is actually a new line.  This works for me:
select split_part(text_column, E'\n', 1) from table;

--
GC


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Split_part on a CR
Next
From: "David Johnston"
Date:
Subject: Re: Split_part on a CR