Re: CSVQL? CSV SQL? tab-separated table I/O? RENAME COLUMN

From: John McKown <john(dot)archie(dot)mckown(at)gmail(dot)com>
To: Jim Michaels <jmichae35(at)gmail(dot)com>
Cc: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: CSVQL? CSV SQL? tab-separated table I/O? RENAME COLUMN
Date: 2018-05-02 22:04:17
Message-ID: CAAJSdjhZYSjGaj4u=_m6wvj7VvWaK06ssh7Ycj=RDS8eY08K8g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, May 2, 2018 at 4:29 PM, Jim Michaels <jmichae35(at)gmail(dot)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(at)gmail(dot)com>
>
>

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

Maranatha! <><
John McKown

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tim Cross 2018-05-02 22:14:55 Re: Index/trigger implementation for accessing latest records
Previous Message Ron 2018-05-02 21:52:53 Re: CSVQL? CSV SQL? tab-separated table I/O? RENAME COLUMN