Re: Import csv to temp table

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Import csv to temp table
Date: 2024-01-02 13:49:36
Message-ID: CANzqJaDck5zK3E6DXzvjVJvoKvHnY9b__QwPy4oLoCVGer31ow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 2, 2024 at 7:02 AM arun chirappurath <arunsnmimt(at)gmail(dot)com>
wrote:

> Dear All,
>
> Do we have any scripts that create a temp table with column names from the
> first row of csv files?
>

How would you determine the data type?

If you assume TEXT for all of them, then it's relatively simple to write
bash which does it.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hilary Cotter 2024-01-02 14:13:18 Re: Testing - Please ignore/delete this message
Previous Message Arbol One 2024-01-02 13:12:32 Testing - Please ignore/delete this message