Re: Split_part on a CR

From: Gary Chambers <gwchamb(at)gwcmail(dot)com>
To: Jeff Ross <jross(at)wykids(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Split_part on a CR
Date: 2012-11-19 20:00:16
Message-ID: alpine.DEB.2.02.1211191457210.10910@bail
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2012-11-19 20:04:32 Re: High SYS CPU - need advise
Previous Message Tom Lane 2012-11-19 19:59:19 Re: Split_part on a CR