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 1l6ybU-0003bt-Li for pgsql-general@arkaria.postgresql.org; Tue, 02 Feb 2021 16:32:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l6ybR-0005k1-MV for pgsql-general@arkaria.postgresql.org; Tue, 02 Feb 2021 16:32:33 +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 1l6ybQ-0005ju-6q for pgsql-general@lists.postgresql.org; Tue, 02 Feb 2021 16:32:33 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l6ybL-0002Jf-MG for pgsql-general@postgresql.org; Tue, 02 Feb 2021 16:32:31 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id B56785C0337; Tue, 2 Feb 2021 11:32:24 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 02 Feb 2021 11:32:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=M WfT5gTJc1m/QMQwSh3d3sOWTeDZlGdjo7Gx+vGpbZ0=; b=eI2OqepHUcj3znp1F MNsygdNDaAb4qqOt1x1FPHm9si13ymPE/KDS8z4V8OAnh6pZMgKNW9v9NWnGTiYv 5WkTy5ZSzuIhzYbumkUg3AeFEtNus/LXym97DmZjFyZc6din/dElwXrUtKjhgSwe dSORU5JeNeeA+reSrCiz/6fq586flFMKquR6DwBZFVQPHOfbN5njCHQNatBlgoTI G2PBC/cp2b/5jjGEX/adnCmdUV7fN1MvCzx8D0WBo36bXNOsBKNllSw22lQs2x5T p97J/pibivfW8tWfiesU3wDLQgn7U28oP3kMdDlRzECdekkW8QttvG9dQZSfoRJ7 WMvVA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=MWfT5gTJc1m/QMQwSh3d3sOWTeDZlGdjo7Gx+vGpb Z0=; b=dwseuqAwdjW5MLWZOcELreENJNqxHE7egATjzzNwOkoI+wBdC4XDCF3ca 2fQ5rZ73KWFrw+2NfhUqEGT+Ox5A+/yJjuOnTHClXp3dlzi5225jSSX2LO0NH5Rh rppgxN8pIBAUj/xAWxdpANk8lavWYpSyfVJD0W+3P9rPhOvQwrvK1pS0uTtr9kAY J5fS1n69IMKkzi64q6c/fJKLgkoSKPDV8lYMaKzSqCq9i2CH4TeabnxNAW5V8WwP 1nn+reM7tiS0xd0XTV4Mi+Qa7duXg1pmfzzg5LuO4gVH0AL1o8JWIgcZ7eo2wBWC k/tWmSQrR2ylbVomjf91A04hpzuKA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrgedtgdeklecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepfeeghfeghfegjeekjeehjedutefhgfeuhffftefhgeff vdeggfektdeghfekfeeknecuffhomhgrihhnpehgihhthhhusgdrtghomhdpphhoshhtgh hrvghsqhhlrdhorhhgnecukfhppeeljedruddufedrvddujedrvdejnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvh gvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: from [192.168.1.4] (97-113-217-27.tukw.qwest.net [97.113.217.27]) by mail.messagingengine.com (Postfix) with ESMTPA id BEDCC24005B; Tue, 2 Feb 2021 11:32:23 -0500 (EST) Subject: Re: permission denied for large object 200936761 To: Andrus , Laurenz Albe , pgsql-general@postgresql.org References: <47c92baa-949b-92d1-c162-1f0d8348fb50@hot.ee> <2eee8862-ea29-3e9c-30ff-82ec7ad4d99f@aklaver.com> <08f90e7b-8d08-d46e-abb7-85dd68bc3078@hot.ee> <6f141378-2651-3c71-1bab-8b5700e45fbd@hot.ee> <6611d34f7f5ab443a6dbac4a188ba4a1f0ecf196.camel@cybertec.at> From: Adrian Klaver Message-ID: <67a7abbc-6039-fee3-23e1-02bccc02376c@aklaver.com> Date: Tue, 2 Feb 2021 08:32:22 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2/2/21 4:12 AM, Andrus wrote: > Hi! > > >> So? What is your point? >> Somebody created a large object of size 0. > > report table has bytea column. It looks likeĀ  psqlodbc driver adds ::lo > castĀ  when inserting binary data: > > https://github.com/hlinnaka/psqlodbc/blob/master/convert.c#L4564 > > and this adds row to pg_largeobject_metadata table. > > Why it adds cast to lo type ? This type does not exist in Postgres > server and causes server error. The comment for the code snippet you linked to is: "/* * the oid of the large object -- just put that in for the * parameter marker -- the data has already been sent to * the large object */" So at that point the deed has been done. The questions to ask: 1) Why the driver thinks it is being passed a large object in the first place? 2) Have there been any recent changes to code that passes through the ODBC driver that would account for 1)? 3) To help with 2), where is 'INSERT INTO report ( ... ) values (.. , '200936767'::lo, ... )" coming from? My suspicion is that it is user initiated change. If it is not and you suspect the ODBC driver then I would suggest bringing it up on the -odbc list: https://www.postgresql.org/list/pgsql-odbc/ > > Andrus. > > -- Adrian Klaver adrian.klaver@aklaver.com