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 1lW89B-0005sl-0g for pgsql-general@arkaria.postgresql.org; Tue, 13 Apr 2021 01:47:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lW899-0006Kc-JJ for pgsql-general@arkaria.postgresql.org; Tue, 13 Apr 2021 01:47:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lW899-0006KU-93 for pgsql-general@lists.postgresql.org; Tue, 13 Apr 2021 01:47:19 +0000 Received: from mail-oo1-xc35.google.com ([2607:f8b0:4864:20::c35]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lW897-00083p-1W for pgsql-general@lists.postgresql.org; Tue, 13 Apr 2021 01:47:18 +0000 Received: by mail-oo1-xc35.google.com with SMTP id h2-20020a4ad7420000b02901e5901169a5so3263185oot.8 for ; Mon, 12 Apr 2021 18:47:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=HdTNA/Gss/HGbK0YWcsQEasTTX+VAUM8m24D26f6oUQ=; b=Fj/AN6t68ibPzRFI5LWIw0TJBLIFUGXW+5OQI48pBApPDXTS+bc45RwI7ND4eZQYNq 8u/EsbhiQEJRt0absJMPqO9sGaQLA83UHNcYtqmWYBEdRAXf2opR60pXytEDKgFugxAD Z3QaJCIFMFWWFv/FVM9PH1PuGhRnBw7L6K0eqA++ALXToT8+8x5sXDQBcqbPELHEI2ru D+qjwcCQr1naaHkC9kvghLkQfCkPEcuDWVluh1ifsrw2HlMnCzDq7SH8WIv3c29mCHPl n8MpGQvtQ4smPiDzaPVUSfArjdV7gK2KKE3aaLjbcZpwOfZKV+kRskusAEcCfUHiPLz9 jyeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=HdTNA/Gss/HGbK0YWcsQEasTTX+VAUM8m24D26f6oUQ=; b=L6FLg4FFNMrg7bHmBUSeB9X6hoVq0ufgsyl2TddcKH7lcgKG7Lqe0+0+/hcrgJR/wS Yzp5L1Jpch5pnT1QDvmFaGf+lXFvrazwLOKuTkT/7waNObyCq9++bH1hUtLLRz6BPSJh C2/T98Th0Sgxdw/vZ90N2gG9ahByi3BSm0JqrI6iUbsEfcEwNQ9MP0bceE68tlpEp6AR X5gsJMel8ZHxv3R5GFSJTyA1KVeZsMPqevDn91V4ZqIwhxZVoh1XlXAaR5NF4LPIkQl9 dMuiAUEqQ+oCDM7BBloEoBj41sn5sie9r1YfTAza+AC8u01vbjvxYIJ7c3P0GisDXBRK mO4A== X-Gm-Message-State: AOAM533fJ3aYsqvz5vJwSGHwEbElOMG0pc3kjna/1aM8NHw3ZWHSt7t2 fB1sbkcNZ6iQcmT0iacCK6Ajfi1ivKM= X-Google-Smtp-Source: ABdhPJx+/jOA+94IjTyingXrP4xUT2o3GCIwHc5mIxxnqvE1rZoKhq3twUs1rml+ELP1Ue/Oze2lgQ== X-Received: by 2002:a05:6820:166:: with SMTP id k6mr8807897ood.12.1618278435893; Mon, 12 Apr 2021 18:47:15 -0700 (PDT) Received: from [192.168.88.10] (ip174-67-141-204.no.no.cox.net. [174.67.141.204]) by smtp.googlemail.com with ESMTPSA id h10sm1896441otm.11.2021.04.12.18.47.15 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Apr 2021 18:47:15 -0700 (PDT) Subject: Re: How can I insert the image as a blob in the table To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: Date: Mon, 12 Apr 2021 20:47:14 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 4/12/21 8:29 PM, Igor Korot wrote: > Hi, guys, > > On Sun, Apr 11, 2021 at 7:08 PM Igor Korot wrote: >> Hi, David, >> >> On Sun, Apr 11, 2021 at 6:57 PM David G. Johnston >> wrote: >>> On Sunday, April 11, 2021, Igor Korot wrote: >>>> Hi, David, >>>> >>>> >>>> On Sun, Apr 11, 2021 at 6:24 PM David G. Johnston >>>> 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? psql only understands text input.  Therefore, the image must be text (like base64) or hex with a leading "\\x". -- Angular momentum makes the world go 'round.