Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1haXWE-0007fB-6C for pgsql-general@arkaria.postgresql.org; Tue, 11 Jun 2019 03:32:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1haXWC-0005la-IO for pgsql-general@arkaria.postgresql.org; Tue, 11 Jun 2019 03:32:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1haXWC-0005iu-0n for pgsql-general@lists.postgresql.org; Tue, 11 Jun 2019 03:32:16 +0000 Received: from mail-io1-xd44.google.com ([2607:f8b0:4864:20::d44]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1haXW8-0005Gi-Qm for pgsql-general@postgresql.org; Tue, 11 Jun 2019 03:32:14 +0000 Received: by mail-io1-xd44.google.com with SMTP id h6so8685948ioh.3 for ; Mon, 10 Jun 2019 20:32:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=mpLPzTu538jT4pKKW+UxrFK7fch3iekhgGIB5uUTZTI=; b=tkIvK93o9WDWAnS2cx3G5LY4nIC7scIw736N7ztR41xppG2oXxclOogRwm5ttW39Xl uqiln5dZrWfGkFufJqZKeQ/R0swdDKxDAy8IMoTDiVT/2aRTBs/K7pHrFGJ/InyxRqs2 6cFB4ObQ/sCCTCetlGru7wpwur78ULb5begIzfxaW2broMmOCOE5r40ObvkKM53l++Qy FDwWE3j8PnZ6uODgchjrsVnXigawxnQh6cNFxwwbA6OvH48NdCBLzjtiJrN3uLGU4HDj DVKJI7Wj8ZmAFhLmk3lr98RvX0CS7OyHOtGd4dZpcP+ZOVLno32v9XsUTWxp5s8nYz6S 9Ffg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=mpLPzTu538jT4pKKW+UxrFK7fch3iekhgGIB5uUTZTI=; b=EFEIPCGjXts4I9os9lHHcff2//Id9+tjPi/W8sC6Gnpw77bwv4XY5Kdyng9xxc2IrU wB6Z5ELrSUHkTgHM4dLwjxglpKeO/M3ieUCQdq53nwKGPtvz3A7keXqobs0AZDokxg7l HJCyr07jmjZX7wH9mWBX35v17iU/Qe9RoxY6UzShJtI04BQfP9kupr19iFNLTjdVaynC 0Q8O9TX/orXTfV0IMs1TPtZOOrcYoboOXHIr97L6c5anW0rrki7oIn3Gqirfgu3esfy1 IKVyjqfuA6w3AKtAX1qHXzko9ZJLFw3JmFhNs6MKp74OQsKWb5qa5zhv69Xrwr6Vv2Wc iEIQ== X-Gm-Message-State: APjAAAXABhz38IfJwVDXSyIaZATZYgBE5G5IXmFrq+BeXdIaLjKbzERC Gg9qyBp4oobRcYnjrAAIyy4= X-Google-Smtp-Source: APXvYqwVSjUReURSx9T2eMlacQXggykKj8Mb6N50zBhMG4ou7uWqunuJrNHW9mSZ0MOPDHoUzOa18A== X-Received: by 2002:a5e:9e03:: with SMTP id i3mr15946308ioq.66.1560223931752; Mon, 10 Jun 2019 20:32:11 -0700 (PDT) Received: from ?IPv6:2601:681:5500:1e3c:603e:a227:bdf4:8d2b? ([2601:681:5500:1e3c:603e:a227:bdf4:8d2b]) by smtp.gmail.com with ESMTPSA id w26sm4098135iom.59.2019.06.10.20.32.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Jun 2019 20:32:11 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: Inserting into the blob From: Rob Sargent X-Mailer: iPhone Mail (16F203) In-Reply-To: Date: Mon, 10 Jun 2019 21:32:10 -0600 Cc: Adrian Klaver , pgsql-general Content-Transfer-Encoding: quoted-printable Message-Id: References: <6cbb4f03-7c05-4473-330d-b220b0a9ec7b@aklaver.com> <84a73244-f26e-c2cc-4fac-81e6e39b7a42@aklaver.com> To: Igor Korot List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > On Jun 10, 2019, at 6:40 AM, Igor Korot wrote: >=20 > Hi, Adrian, >=20 >> On Mon, Jun 10, 2019 at 7:03 PM Adrian Klaver = wrote: >>=20 >>> On 6/10/19 9:30 AM, Igor Korot wrote: >>>=20 >>>=20 >>> 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 solution (to get the file from the client)? >>=20 >> This would depend on what is is you are trying to accomplish: >>=20 >> 1) Are you really wanting to insert a file at a time at the psql command >> line? >=20 > Yes. Gnarly. I suppose you could open the pdf in emacs and tell emacs to NOT ren= der it. Cut the entire buffer and paste it, properly quoted, into your psql c= ommand line. But \lo stuff seems much more likely to work.=20 >=20 >>=20 >> 2) If not then is there a program you are using/writing that will insert >> the data? >=20 > More like the program will query for the data... >=20 > Thank you. >=20 >>=20 >>>=20 >>> Thank you. >>>=20 >>=20 >>=20 >>=20 >> -- >> Adrian Klaver >> adrian.klaver@aklaver.com >=20 >=20