Re: [HACKERS] proposal: psql statements \gstore \gstore_binary(instead COPY RAW) - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: [HACKERS] proposal: psql statements \gstore \gstore_binary(instead COPY RAW)
Date
Msg-id dba1dfaa-a304-c996-cec7-ae93c2ab8d1c@BlueTreble.com
Whole thread Raw
In response to [HACKERS] proposal: psql statements \gstore \gstore_binary (instead COPY RAW)  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: [HACKERS] proposal: psql statements \gstore \gstore_binary(instead COPY RAW)  (Andrew Dunstan <andrew@dunslane.net>)
Re: [HACKERS] proposal: psql statements \gstore \gstore_binary(instead COPY RAW)  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On 12/9/16 9:39 AM, Pavel Stehule wrote:
>
> SELECT image FROM accounts WHERE id = xxx
> \gstore_binary ~/image.png
>
> What do you think about this proposal?

Seems reasonable.

I've lost track at this point... is there a way to go the other 
direction with that as well? Namely, stick the contents of a file into a 
field via an INSERT or UPDATE?

I've done that in the past via psql -v var=`cat file`, but there's 
obviously some significant drawbacks to that...
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] Macro customizable hashtable / bitmapscan &aggregation perf
Next
From: Andrew Dunstan
Date:
Subject: Re: [HACKERS] proposal: psql statements \gstore \gstore_binary(instead COPY RAW)