Re: How can I insert the image as a blob in the table

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: Igor Korot <ikorot01(at)gmail(dot)com>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: How can I insert the image as a blob in the table
Date: 2021-04-13 01:38:09
Message-ID: 62B80287-A91E-4990-975E-F0BF9336B187@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> On Apr 12, 2021, at 7:29 PM, Igor Korot <ikorot01(at)gmail(dot)com> wrote:
>
> Hi, guys,
>
> On Sun, Apr 11, 2021 at 7:08 PM Igor Korot <ikorot01(at)gmail(dot)com <mailto:ikorot01(at)gmail(dot)com>> wrote:
>>
>> Hi, David,
>>
>> On Sun, Apr 11, 2021 at 6:57 PM David G. Johnston
>> <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>>>
>>> On Sunday, April 11, 2021, Igor Korot <ikorot01(at)gmail(dot)com> wrote:
>>>>
>>>> Hi, David,
>>>>
>>>>
>>>> On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston
>>>> <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
>>>>
>>>>> If you can decide on what client interface you want to use there should be existing resources on the web walking through how to do this using that client interface.
>>>>
>>>> Something like this:
>>>>
>>>> INSERT INTO images(image) VALES( loadfile( /home/igor/my_image) );
>>>>
>>>> Looking to run it from gAdmin in the Terminal.
>>>
>>>
>>> As SQL is executed on the server there is the major issue of the server being unable to resolve /home on the client machine. But maybe pgAdmin has its own way to deal with this. Have you read its documentation?
>>
>> I don't know - server is running on the same OSX machine as pgAdmin will be.
>
> So nobody is playing with the images?
>
> Is it even possible - to insert an image as BLOB into the database
> using a simple
> INSERT INTO query?

Many of us ‘play with images’. We use tools to write to the database. I’m currently using java to write millions of records into the database include bytea columns with 50-100K binary data. What tools do you have at hand?
It’s difficult to get an image into a string like ‘insert into tablename values (<what would go here>)’

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2021-04-13 01:47:14 Re: How can I insert the image as a blob in the table
Previous Message Igor Korot 2021-04-13 01:29:59 Re: How can I insert the image as a blob in the table