Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gGTpX-0000zP-Jn for pgsql-general@arkaria.postgresql.org; Sat, 27 Oct 2018 19:01:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gGTpV-0000C5-V7 for pgsql-general@arkaria.postgresql.org; Sat, 27 Oct 2018 19:01:01 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gGTpU-0000By-LR for pgsql-general@lists.postgresql.org; Sat, 27 Oct 2018 19:01:01 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gGTpR-000684-Jr for pgsql-general@lists.postgresql.org; Sat, 27 Oct 2018 19:00:59 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 6F8C0C74; Sat, 27 Oct 2018 15:00:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 27 Oct 2018 15:00:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=c G4oUrFwyE5InVksrJF05FLFHaqxdTIwsa4Vo4OGv8U=; b=xk4Zvv1yuoAQLewPJ 6Zk+2vg+nGaPNN+P1H77UtWdonQwqZ93xBwLnIHRDwsEoXCgzcrscwOFQPPtrU76 rxzX/YK9kcMS+xXB+lAcisiI+iQAr28d/9T9Z5CxJIsc+iz2WaHdNWkmZqZgIE9R IqKZNBNY6mD97fYfRxm/8+jaVJXbrB/bcHUa3cAeW9cT4t5F0fvfnKAHx7cnWH6n ylAyvOTTwZyksTTxJJ3mtKRPqDeTPn2cpFLUM1YXvKIbZlfRmIYBRKSwobHKHze8 pnWRKPdw0ZiQuUePlRwWd8GYk/EhaFWvXAhlcBPBhJIc9Bq41RdsEoSz27qhFQCq Qp85w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm1; bh=cG4oUrFwyE5InVksrJF05FLFHaqxdTIwsa4Vo4OGv 8U=; b=czfFn/MXGzHYvyux256nyQ8R/DTaL9Aipj/cVu/kMgkal8Jlaj80ki+4v 5SMvZTPjZfsB2UrbOYsbdqHvgtf+/piSvxf3NZfF8aPXJz3kqf1zVzqbws5v3EdK w6C9DqJcrqx3SQyiw2omKxY9y3AGuN+mvABsUW9CQ1XYoSH/xMIDT5j1h+d+FqYT I/yJuX0lVt3WiJLDKZuoUkUTCo4K0WFLTjW/7SnYBT5EOkldemsUea/4VvsYyA4A miAyJul8Os5qdqLrZNRG0xG44gsNcpXlDKEFan+n73yBNm2O+mHDLtKAh+kg9uee E31w5URdTqO2Sl76N45olvwIF0+8w== X-ME-Sender: X-ME-Proxy: Received: from [192.168.1.3] (unknown [71.212.134.3]) by mail.messagingengine.com (Postfix) with ESMTPA id 0FC24E43AC; Sat, 27 Oct 2018 15:00:53 -0400 (EDT) Subject: Re: rw_redis_fdw: SQL Errors when statement is within a function To: GPT Cc: Christoph Moench-Tegeder , pgsql-general@lists.postgresql.org References: <20181025101948.r2hsnsm2ysn7q3ic@alap3.anarazel.de> <20181025215749.6yy3aparryceuker@squirrel.exwg.net> <20181026212725.33rqwraa73wpzq5f@squirrel.exwg.net> From: Adrian Klaver Message-ID: Date: Sat, 27 Oct 2018 12:00:53 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 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 10/27/18 8:00 AM, GPT wrote: > On 10/27/18, Adrian Klaver wrote: >> On 10/27/18 2:28 AM, GPT wrote: >> ... >> Postgres is going to do all sorts of things under the hood when you run >> a query, that is not going to change. > + Ok. That's clear. > + >> The issue you had bubbled up to >> you the user because the FDW you where using got caught by a change in >> behavior. > + OK. I keep that in mind for future similar incidents. It is not a > problem in my function, or in Redis, neither my system has suddenly > broken, neither re-installation of packages is required, neither > wοndering hours what has suddenly happened and a very simple sql > statement does not get executed,... Just to be clear the SQL works fine when run against Postgres directly. The issue is that the FDW reparse's the statement to make it work with Redis. It was the reparsing that caused the problem, this is not something Postgres has control over. > + >> That is going to happen and the developer dealt with it and >> hopefully put in a test for it, for future changes. > + That's correct, the developer did his best. Something to note from here: https://github.com/nahanni/rw_redis_fdw "This project is currently work in progress and may have experience significant changes until it becomes stable. Use it with caution and at your own risk! PostgreSQL version compatibility Currently tested against PostgreSQL 9.4+, 10.5. Other versions might work but unconfirmed. " >> ... >> I would also suggest learning psql: >> >> https://www.postgresql.org/docs/11/static/app-psql.html >> >> It operates closer to the database and eliminates some of the >> translation issues caused by running through drivers. > + OK. Also clear! >> >> ... > + Thanks Adrian for your short and substantial response. > + Thanks to the other guys who has spent time to respond, too. > + Sorry, if I have been unpleasant. >> -- >> Adrian Klaver >> adrian.klaver@aklaver.com >> > -- Adrian Klaver adrian.klaver@aklaver.com