Re: New "single" COPY format

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: Joel Jacobson <joel(at)compiler(dot)org>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: New "single" COPY format
Date: 2024-11-08 11:25:18
Message-ID: CAJ7c6TPsLXoJQ4rMh7C+onESCzutWtBVe0dOff3t7k8YhzDvfg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

> > Recap: This is about adding support to import/export text-based formats such as
> > JSONL, or any unstructured text file, where wanting to import each line "as is"
> > into a single column, or wanting to export a single column to a text file.
>
> Sorry for being late for the discussion.
>
> I disagree with the idea of adding a new format name for this. Mostly
> because it is *not* a new format and pretending that it is will be
> just a poor and/or confusing user interface.
>
> IMO it should be 'text' we already have with special options e.g.
> DELIMITER AS NULL ESCAPE AS NULL. If there are no escape characters
> and column delimiters (and no NULLs designations, and what else I
> forgot) then your text file just contains one tuple per line.

Personally I wouldn't mind a special syntax such as LINES AS IS or
maybe COPY AS IS for convenience. Perhaps we should discuss it
separately though as a syntax sugar for a long list of options we
already support.

--
Best regards,
Aleksander Alekseev

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2024-11-08 11:35:23 Re: Fix small typo, use InvalidRelFileNumber instead of InvalidOid
Previous Message Aleksander Alekseev 2024-11-08 11:18:00 Re: New "single" COPY format