Re: Inserting into the blob

2019-06-10 Thread Igor Korot
Hi, David, On Mon, Jun 10, 2019 at 10:45 PM David G. Johnston wrote: > > On Mon, Jun 10, 2019 at 8:32 PM Rob Sargent wrote: >> >> > On Jun 10, 2019, at 6:40 AM, Igor Korot wrote: >> > >> > Hi, Adrian, >> > >> >> On Mon, Jun 10, 2019 at 7:03 PM Adrian Klaver >> >> wrote: >> >> >> >>> On 6/10/1

Re: Inserting into the blob

2019-06-10 Thread Rob Sargent
> > >> 1) Are you really wanting to insert a file at a time at the psql command > >> line? > > > > Yes. > Gnarly. I suppose you could open the pdf in emacs and tell emacs to NOT > render it. Cut the entire buffer and paste it, properly quoted, into your > psql command line. But \lo stuff see

Re: Inserting into the blob

2019-06-10 Thread David G. Johnston
On Mon, Jun 10, 2019 at 8:32 PM Rob Sargent wrote: > > On Jun 10, 2019, at 6:40 AM, Igor Korot wrote: > > > > Hi, Adrian, > > > >> On Mon, Jun 10, 2019 at 7:03 PM Adrian Klaver < > adrian.kla...@aklaver.com> wrote: > >> > >>> On 6/10/19 9:30 AM, Igor Korot wrote: > >>> > >>> According to > https

Re: Inserting into the blob

2019-06-10 Thread Rob Sargent
> On Jun 10, 2019, at 6:40 AM, Igor Korot wrote: > > Hi, Adrian, > >> On Mon, Jun 10, 2019 at 7:03 PM Adrian Klaver >> wrote: >> >>> On 6/10/19 9:30 AM, Igor Korot wrote: >>> >>> >>> According to >>> https://stackoverflow.com/questions/16048649/postgresql-9-x-pg-read-binary-file-inserti

Re: Inserting into the blob

2019-06-10 Thread Igor Korot
Hi, Adrian, On Mon, Jun 10, 2019 at 7:03 PM Adrian Klaver wrote: > > On 6/10/19 9:30 AM, Igor Korot wrote: > > > > > According to > > https://stackoverflow.com/questions/16048649/postgresql-9-x-pg-read-binary-file-inserting-files-into-bytea, > > the file needs to be on the server inside PGDATA d

Re: Inserting into the blob

2019-06-10 Thread Adrian Klaver
On 6/10/19 9:30 AM, Igor Korot wrote: According to https://stackoverflow.com/questions/16048649/postgresql-9-x-pg-read-binary-file-inserting-files-into-bytea, the file needs to be on the server inside PGDATA directory. It is not a problem in general, but just curious - is there a more generic

Re: Inserting into the blob

2019-06-10 Thread Daniel Verite
Igor Korot wrote: > It is not a problem in general, but just curious - is there a more > generic solution (to get the file from the client)? With psql: \lo_import /path/to/file It creates a large object with the contents of the file from the client file system and returns its unique ID

Re: Inserting into the blob

2019-06-10 Thread Matthias Apitz
El día Monday, June 10, 2019 a las 11:30:42AM -0500, Igor Korot escribió: > > According to > https://stackoverflow.com/questions/16048649/postgresql-9-x-pg-read-binary-file-inserting-files-into-bytea, > the file needs to be on the server inside PGDATA directory. > It is not a problem in general,

Re: Inserting into the blob

2019-06-10 Thread Igor Korot
Hi, Adrian, On Mon, Jun 10, 2019 at 8:38 AM Adrian Klaver wrote: > > On 6/9/19 10:06 AM, Igor Korot wrote: > > Hi, Adrian, > > > > On Sun, Jun 9, 2019 at 11:14 PM Adrian Klaver > > wrote: > >> > >> On 6/9/19 8:28 AM, Igor Korot wrote: > >>> Hi, ALL, > >>> How do I insert the png file (content,

Re: Inserting into the blob

2019-06-10 Thread Adrian Klaver
On 6/9/19 10:06 AM, Igor Korot wrote: Hi, Adrian, On Sun, Jun 9, 2019 at 11:14 PM Adrian Klaver wrote: On 6/9/19 8:28 AM, Igor Korot wrote: Hi, ALL, How do I insert the png file (content, not a name) into the BLOB field in the table i PostgreSQL DB? Are you talking about this data type?:

Re: Inserting into the blob

2019-06-09 Thread Igor Korot
Hi, Adrian, On Sun, Jun 9, 2019 at 11:14 PM Adrian Klaver wrote: > > On 6/9/19 8:28 AM, Igor Korot wrote: > > Hi, ALL, > > How do I insert the png file (content, not a name) into the BLOB field > > in the table i PostgreSQL DB? > > Are you talking about this data type?: > > https://www.postgresql

Re: Inserting into the blob

2019-06-09 Thread Adrian Klaver
On 6/9/19 8:28 AM, Igor Korot wrote: Hi, ALL, How do I insert the png file (content, not a name) into the BLOB field in the table i PostgreSQL DB? Are you talking about this data type?: https://www.postgresql.org/docs/11/datatype-binary.html Or this?: https://www.postgresql.org/docs/11/large

Inserting into the blob

2019-06-09 Thread Igor Korot
Hi, ALL, How do I insert the png file (content, not a name) into the BLOB field in the table i PostgreSQL DB? Thank you.