Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lW80U-0005bk-A3 for pgsql-general@arkaria.postgresql.org; Tue, 13 Apr 2021 01:38:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lW80T-00020b-7w for pgsql-general@arkaria.postgresql.org; Tue, 13 Apr 2021 01:38:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lW80S-00020U-Sq for pgsql-general@lists.postgresql.org; Tue, 13 Apr 2021 01:38:21 +0000 Received: from mail-pg1-x52f.google.com ([2607:f8b0:4864:20::52f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lW80O-0006lN-3G for pgsql-general@lists.postgresql.org; Tue, 13 Apr 2021 01:38:20 +0000 Received: by mail-pg1-x52f.google.com with SMTP id b17so10799436pgh.7 for ; Mon, 12 Apr 2021 18:38:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=7v/CpSLueE9J0ML8BVUWA+YDnpLgAk9fvwZT1cPcOeU=; b=jbIDWNsH7NxxFJM4ZNTVUekfN6OoArzWKP09RHi9xj80uhBI/5k/O7NaVvICPKWZuN 8jZPrihtu0yKL59rRCCk87HBUCAnnCehKhYt6DWpiJVBhKRf44dhkMoEe1Igynd/2BD+ mK1vTVHqBDo4Mej+akmly3EKgN4D0Jki2R0i2tHLMpbgVExIF8WAolDKt50DXR2stLDv U1Pw9vaBfztcgyj3XgolWHp6rbJ0tPEJxD3Z34hzEZAycwkgOhkjQF9DTsMu6zbu6ISh Du/qxGK23HbK0T3AR7ZYmsJxtp3KxhCAmm0vX8YvgQMZ+EpqMl1C1SE06xrNvsu7kyq7 oyMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=7v/CpSLueE9J0ML8BVUWA+YDnpLgAk9fvwZT1cPcOeU=; b=BfYs64IWYToX0t/mSAQUhTj96lHamVtX8f0moObDwcQHc6sKQDaNbiWXcNGMQHXtgB OvDGxMFQc+XjCPppQxzkAGscXco8lEdeKPSgvDUHQlz2D2EjzDGp5fMw9Oebgc7LctcP 1oZqGu4aPn5RHOCmCrCOQM8iINYAhFnPm2klNw3BVWMk+KLdr/WKLzv3WTes1+QN94eE iFhH+b6H4KGgNf9FqAGhn8caOP3QGBIQ0lw6yy/HXyQW8l4FioKQgmMP0X7WBbR0tnCc vF64KBo8aNyBbNkEWqBA2hYfrh3cOtYlTpvO3rIyLNGXKKp0ij/Yw0kuKCSazgStao7n xydg== X-Gm-Message-State: AOAM531iM5ygpp2nLV9ra2ytZqHBQFSdkjlCxwuJAI0oLsKqt/5ZUR8Q iXIfpP+TBIb+IpqiR/YBvGE= X-Google-Smtp-Source: ABdhPJzahkAFy8+BI11u1pJUHAi3B0Omsl0XVOX2CQ8TTl4QjwyOpxTPqD+14DxaCK3mG5o+ivb2LA== X-Received: by 2002:aa7:874d:0:b029:247:fb8a:74c with SMTP id g13-20020aa7874d0000b0290247fb8a074cmr16105215pfo.52.1618277893175; Mon, 12 Apr 2021 18:38:13 -0700 (PDT) Received: from bus-094542.ad.utah.edu ([155.98.131.2]) by smtp.gmail.com with ESMTPSA id v13sm10146866pfu.54.2021.04.12.18.38.12 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Apr 2021 18:38:12 -0700 (PDT) From: Rob Sargent Message-Id: <62B80287-A91E-4990-975E-F0BF9336B187@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_7995D09A-5286-4CF1-B919-49A52DE6AAA5" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: How can I insert the image as a blob in the table Date: Mon, 12 Apr 2021 19:38:09 -0600 In-Reply-To: Cc: "David G. Johnston" , "pgsql-generallists.postgresql.org" To: Igor Korot References: X-Mailer: Apple Mail (2.3654.60.0.2.21) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_7995D09A-5286-4CF1-B919-49A52DE6AAA5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > > On Apr 12, 2021, at 7:29 PM, Igor Korot wrote: >=20 > Hi, guys, >=20 > On Sun, Apr 11, 2021 at 7:08 PM Igor Korot > wrote: >>=20 >> Hi, David, >>=20 >> On Sun, Apr 11, 2021 at 6:57 PM David G. Johnston >> wrote: >>>=20 >>> On Sunday, April 11, 2021, Igor Korot wrote: >>>>=20 >>>> Hi, David, >>>>=20 >>>>=20 >>>> On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston >>>> wrote: >>>>=20 >>>>> 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. >>>>=20 >>>> Something like this: >>>>=20 >>>> INSERT INTO images(image) VALES( loadfile( /home/igor/my_image) ); >>>>=20 >>>> Looking to run it from gAdmin in the Terminal. >>>=20 >>>=20 >>> 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? >>=20 >> I don't know - server is running on the same OSX machine as pgAdmin = will be. >=20 > So nobody is playing with the images? >=20 > Is it even possible - to insert an image as BLOB into the database > using a simple > INSERT INTO query? Many of us =E2=80=98play with images=E2=80=99. We use tools to write to = the database. I=E2=80=99m 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=E2=80=99s difficult to get an image into a string like =E2=80=98insert = into tablename values ()=E2=80=99 --Apple-Mail=_7995D09A-5286-4CF1-B919-49A52DE6AAA5 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
>
On Apr 12, 2021, at 7:29 PM, Igor Korot = <ikorot01@gmail.com> wrote:

Hi, guys,

On Sun, Apr 11, 2021 at 7:08 PM Igor Korot <ikorot01@gmail.com> = wrote:

Hi, David,

On Sun, Apr 11, 2021 = at 6:57 PM David G. Johnston
<david.g.johnston@gmail.com> wrote:

On = Sunday, April 11, 2021, Igor Korot <ikorot01@gmail.com> = wrote:

Hi, David,


On = Sun, Apr 11, 2021 at 6:24 PM David G. Johnston
<david.g.johnston@gmail.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 =E2=80=98play with images=E2=80=99.  We = use tools to write to the database.  I=E2=80=99m 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=E2=80=99s difficult to get an image into a = string like =E2=80=98insert into tablename values (<what would go = here>)=E2=80=99



= --Apple-Mail=_7995D09A-5286-4CF1-B919-49A52DE6AAA5--