Search Postgresql Archives

Re: insert binary data into a table column with psql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



jtkells, 25.07.2012 03:43:
Thanks much for your reply, that does the trick quite nicely. But, I just
came to the realization that this only works if your are running the
client and the file both resides  on the database server.  I thought that
I would be able to do this from a remote server where the client was
running, picking up a local file and sending it into a remote database
table.

If you can use a different client, you might want to look at SQL Workbench/J

It has support to do just that. You can write e.g.


insert into x (id, load_date, image)
values
(1, current_date, {$blobfile=/tmp/myimage.jpg});

and the file will be read from the client (where SQL Workbench is running).
(note that "large objects" are _not_ supported, only bytea)

http://www.sql-workbench.net/
http://www.sql-workbench.net/manual/using.html#blob-support

It's Java/JDBC based, has a GUI and console mode.

Disclaimer: I am the author of that tool.

Regards
Thomas




--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux