Re: CSVQL? CSV SQL? tab-separated table I/O? RENAME COLUMN - Mailing list pgsql-general

From John McKown
Subject Re: CSVQL? CSV SQL? tab-separated table I/O? RENAME COLUMN
Date
Msg-id CAAJSdjhZYSjGaj4u=_m6wvj7VvWaK06ssh7Ycj=RDS8eY08K8g@mail.gmail.com
Whole thread Raw
In response to CSVQL? CSV SQL? tab-separated table I/O? RENAME COLUMN  (Jim Michaels <jmichae35@gmail.com>)
List pgsql-general
On Wed, May 2, 2018 at 4:29 PM, Jim Michaels <jmichae35@gmail.com> wrote:
what do you think about foreign data wrappers getting CSV file table I/O?
- I had thought that CSVQL db could be implemented completely with
​<snip>

​I don't know what you want to do with this. SQLite already supports it. SQLite is an embedded SQL database​ software. To a great extent, the SQL that it understands is similar to what PostgreSQL understands. It is one of the "standards" that the author uses. It implements "virtual tables" via extensions. One of these is to process CSV files. ref: http://sqlite.org/csv.html  The CSV it understands is RFC 4180 format (https://www.ietf.org/rfc/rfc4180.txt). SQLite is open source and is _PUBLIC DOMAIN_. That is, it has NO copyright at all. So you can do anything with it that you want to. You might even be able to use the source to the SQLite extension ( https://www.sqlite.org/src/artifact?ci=trunk&filename=ext/misc/csv.c ) to write the PostgreSQL foreign data wrapper.

So, if you just need something so that you can read a CSV using SQL, then you might consider using SQLite instead of, or in addition to, PostgreSQL. Or, if you need to do subselects, unions, or other things containing both PostgreSQL data & CSV data, then I guess you're stuck with the foreign data wrapper. 

 

--
======
Jim Michaels <jmichae35@gmail.com>




--
We all have skeletons in our closet.
Mine are so old, they have osteoporosis.

Maranatha! <><
John McKown

pgsql-general by date:

Previous
From: Ron
Date:
Subject: Re: CSVQL? CSV SQL? tab-separated table I/O? RENAME COLUMN
Next
From: Tim Cross
Date:
Subject: Re: Index/trigger implementation for accessing latest records