string parsing - Mailing list pgsql-general

From Jean-Christian Imbeault
Subject string parsing
Date
Msg-id 3D99B0FA.4080002@mega-bucks.co.jp
Whole thread Raw
Responses COPY FROM stdin;  (Chris Gamache <cgg007@yahoo.com>)
List pgsql-general
Ok, this may sounds strange but ...

I have user input that is in japanese and I need to parse it. I am using
PHP and PostgreSQL but PHP's multi-byte string parsing functions don't
seem to be working (still experimental).

So my hack is to put the strings into the DB and have postgreSQL do the
parsing for me since postgreSQL doesn't seem to have any trouble
handling multi-byte strings as far as my testing as shown.

Now for the strange request ....

Is there an SQl query that will parse a string on a separator (whites
pace) and return one word per row in the result set? (I don't know *any*
perl so I can't write a PL/PGSQL function, and I'm worried that a perl
function wouldn't be multi-byte safe ...)

Sorry to ask such an OT question but I've been trying the various string
functions of pg and so far I have been able to do this ...

Thanks,

Jc


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: cluster replication with intermezzo
Next
From: Bruce Momjian
Date:
Subject: Re: current_timestamp after queries