Re: COPY table_name (single_column) FROM 'iso-8859-1.txt' DELIMITER E'\n' - Mailing list pgsql-hackers

From Tom Lane
Subject Re: COPY table_name (single_column) FROM 'iso-8859-1.txt' DELIMITER E'\n'
Date
Msg-id 4046534.1620244307@sss.pgh.pa.us
Whole thread Raw
In response to Re: COPY table_name (single_column) FROM 'iso-8859-1.txt' DELIMITER E'\n'  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: COPY table_name (single_column) FROM 'iso-8859-1.txt' DELIMITER E'\n'
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 5/5/21 2:45 PM, Tom Lane wrote:
>> Yeah, that's because of the conversion to "chr".  But a regexp
>> is overkill for that anyway.  Don't we have something that will
>> split on simple substring matches?

> Not that I know of. There is split_part but I don't think that's fit for
> purpose here. Do we need one, or have I missed something?

[ checks manual ... ]

string_to_array or string_to_table would do, I think.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: COPY table_name (single_column) FROM 'iso-8859-1.txt' DELIMITER E'\n'
Next
From: Robert Haas
Date:
Subject: Re: .ready and .done files considered harmful