Re: insert binary data into a table column with psql

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: insert binary data into a table column with psql
Дата
Msg-id 500F1207.6070600@hogranch.com
обсуждение исходный текст
Ответ на insert binary data into a table column with psql  (jkells <jtkells@verizon.net>)
Ответы Re: insert binary data into a table column with psql  (Lonni J Friedman <netllama@gmail.com>)
Список pgsql-general
On 07/24/12 1:28 PM, jkells wrote:
> from psql
> I have tried several ways including creating a function to read a file
> without any success but basically I want to do something like the
> following from a bash shell
>
> psql <connection information> -c "insert into x (ID, load_date, image)
> values ($PID,clock_timestamp()::timestamp(0), copy from '/tmp/$FN' with
> binary);"
>
> Any help would be greatly appreciated

use a proper programming language that can read files and insert BYTEA
data.   shell + psql just won't cut it.   I'd suggest perl or python or
java or whatever.



--
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast


В списке pgsql-general по дате отправления:

Предыдущее
От: François Beausoleil
Дата:
Сообщение: Re: Pg 9.1: Do I need to run vacuum analyze instead vacuum full?
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Pg 9.1: Do I need to run vacuum analyze instead vacuum full?