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 1m3l0F-00037x-8m for pgsql-general@arkaria.postgresql.org; Wed, 14 Jul 2021 19:57:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m3l0D-0004Z4-W0 for pgsql-general@arkaria.postgresql.org; Wed, 14 Jul 2021 19:57:05 +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 1m3l0D-0004Yv-L9 for pgsql-general@lists.postgresql.org; Wed, 14 Jul 2021 19:57:05 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m3l0B-0005C4-6F for pgsql-general@lists.postgresql.org; Wed, 14 Jul 2021 19:57:05 +0000 Received: by mail-ed1-x532.google.com with SMTP id h2so4810068edt.3 for ; Wed, 14 Jul 2021 12:57:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=sR9cXbpQ0dsLES2K3Hskput2xFxjQOmHMOdZXBDaEqA=; b=U5SA3Xm0rt8ZWqFFctescVs8m/KYmVYKfoyixGsnWByOGmSXvDLVXH7qMLoHoBlQFb U0IH3lkMF1FGwDq/ogIzG4kuqZyWMbeYvOUblhEdViVKsI9AnmO6TiY+/r2lagvEHahT B6/spS9cKOkGpDIW4HvsWB1UbQEPFRFWCZlSKhcfqGiFql3z6d9GDbEETRijiofUv0vf +TUdg0FiqOMLRIlNRaa47v2ZYkv+1QnPfPXdgUPSX6pg7MxYd+8GO5+pcmlaViDWxrmA Ed1plSNvvTajlzQxjccFmVdBLC1F2FCnhPFu+iZ6o4MgCIi7yuNLENL4LN3/dwajUojp e3ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=sR9cXbpQ0dsLES2K3Hskput2xFxjQOmHMOdZXBDaEqA=; b=bNy1atjcT+KVQNPlS5it8n3HBpIrCwaou/g34u1Mam9hAiJjAbjK4d5v0I7GIbrjZv OH9O+XyvdKXjfQleUnBONRthM7xaJ2HtLWiSM9bjy/6ntZmFarUaYOs9aoPkg4NdqzJL erTKumnXVcLyryAV7jp3S34VERydG1hPKe+TnblvehrxAX2WDzwtHTph9Ty/RQakXWDF XrPxj3CNCVmrPYmgnk7dVcZKBIU9ECycl4ErUY+DTKu8HiYeaxHrHU8PygrVRYy7w8+I urjFgwMq2lqIeSMMxRDRp+TW4uVVQHFAJtklYRUbiTyVxExM7Wrgk8NkQoFzsJkdUoI0 fMvQ== X-Gm-Message-State: AOAM530U61SR9rLx6dLkdsAsTb00FYcR7q3i0i2OvuzHAcrXK0PNKKwj u7jZyx1MxNhMwmjUfCWwNP5iUdkD/NU= X-Google-Smtp-Source: ABdhPJyTn5kkd2TllwqggrxrFHTgemR5G1jsjsUq48jb3XSLtXLrIXmrJFI3f01HQ7J2nc/ITolQTA== X-Received: by 2002:a05:6402:d7:: with SMTP id i23mr15891374edu.291.1626292620452; Wed, 14 Jul 2021 12:57:00 -0700 (PDT) Received: from [95.85.160.189] ([95.85.160.189]) by smtp.gmail.com with ESMTPSA id dj16sm1457176edb.0.2021.07.14.12.56.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Jul 2021 12:56:59 -0700 (PDT) To: PostgreSQL General From: Csanyi Pal Subject: How to display stored image as bytea or as large objects? Message-ID: Date: Wed, 14 Jul 2021 21:56:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Language: hu-HU Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, I am a novice in postgresql language. By reading the documentation about storing binary data in postgresql database, I realize that that one can store images as binary data by using bytea or BLOB data types. I am running postgresql on Ubuntu 20.04.2 LTS and using pgAdmin4 in Desktop mode. I have stored an image in one of my table with this command: insert into leckek (az, a_tanitas_nyelve, mely_negyedevben, mely_osztalyban, mely_tagozaton, mely_orakon, a_tanitas_temaja, a_lecke_neve, a_lecke_gyakorlati_reszenek_neve, a_lecke_gyakorlati_reszenek_dokumentuma, a_lecke_elmeleti_reszenek_neve, a_lecke_elmeleti_reszenek_dokumentuma, a_lecke_elmeleti_reszenek_tesztje) values (default, 'Hu', 1, 5, 'b', '1-2', 'Élet és mukakörnyezet', 'A technika és technológia fogalma, szerepe és jelentősége', 'másolás', default, 'A lényeg', lo_import('/home/pali/Irataim/Iskola/IskolaEv_2020_2021/MuszakiOraim/Digitalis_Tananyagok_Orakra/Hu/5/5_osztaly_Tananyag_01_02_orara.png'), default) so I have now in this table the first row: 1 "Hu" 1 5 "b" "1-2 " "Élet és mukakörnyezet" "A technika és technológia fogalma, szerepe és jelentősége" "másolás" "A lényeg" "16800" Here the 16800 is the OID of the binary data, the image. I would like to know how can one display this stored image somehow by using some IDE for manage databases? In applications like pgAdmin4, Libreoffice Base, pgModeler, DBeaver one can't display this stored image. In SQLiteBrowser (this is an IDE for SQLite databases) one can display with easy the stored image. So is there an easy way to display a stored image in postgresql? -- Best, from Paul