pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: GPT <gptmailinglists@gmail.com>
Cc: Christoph Moench-Tegeder <cmt@burggraben.net>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: rw_redis_fdw: SQL Errors when statement is within a function
Date: Sat, 27 Oct 2018 12:00:53 -0700
Message-ID: <fcdac771-943a-8e9b-45c1-c1dd60f2cf13@aklaver.com> (raw)
In-Reply-To: <CADep2POfGL-axLe+wWgxoqPomWM0qMW93zyN_5zypDduAUVA7g@mail.gmail.com>
References: <CADep2PPVOo68kRsC0yDF0X_neUGd8pduTKnmyDp0RSaDajTuEg@mail.gmail.com>
	<20181025101948.r2hsnsm2ysn7q3ic@alap3.anarazel.de>
	<CADep2PN_T+frUJG07oKRJ0DfUALuuoaSbvKq_nposNNaSWjX2w@mail.gmail.com>
	<20181025215749.6yy3aparryceuker@squirrel.exwg.net>
	<CADep2PNC2f57EL8ZtKb999oXvYWNBok74m033xMRG4AFw03fMQ@mail.gmail.com>
	<20181026212725.33rqwraa73wpzq5f@squirrel.exwg.net>
	<CADep2PPhWwGVJb2YmvbUuQn+AaMXn-Q7SbXHPfSGNbN=1i5NKg@mail.gmail.com>
	<a4cac72b-73a4-0005-b8dc-9a159c9af16a@aklaver.com>
	<CADep2POfGL-axLe+wWgxoqPomWM0qMW93zyN_5zypDduAUVA7g@mail.gmail.com>

On 10/27/18 8:00 AM, GPT wrote:
> On 10/27/18, Adrian Klaver <adrian.klaver@aklaver.com> 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




view thread (25+ messages)  latest in thread

Message-ID: <fcdac771-943a-8e9b-45c1-c1dd60f2cf13@aklaver.com>
Permalink:  ../fcdac771-943a-8e9b-45c1-c1dd60f2cf13@aklaver.com/
Also on:    postgresql.org/message-id/fcdac771-943a-8e9b-45c1-c1dd60f2cf13@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, gptmailinglists@gmail.com, cmt@burggraben.net
  Subject: Re: rw_redis_fdw: SQL Errors when statement is within a function
  In-Reply-To: <fcdac771-943a-8e9b-45c1-c1dd60f2cf13@aklaver.com>
  References: <CADep2PPVOo68kRsC0yDF0X_neUGd8pduTKnmyDp0RSaDajTuEg@mail.gmail.com> <20181025101948.r2hsnsm2ysn7q3ic@alap3.anarazel.de> <CADep2PN_T+frUJG07oKRJ0DfUALuuoaSbvKq_nposNNaSWjX2w@mail.gmail.com> <20181025215749.6yy3aparryceuker@squirrel.exwg.net> <CADep2PNC2f57EL8ZtKb999oXvYWNBok74m033xMRG4AFw03fMQ@mail.gmail.com> <20181026212725.33rqwraa73wpzq5f@squirrel.exwg.net> <CADep2PPhWwGVJb2YmvbUuQn+AaMXn-Q7SbXHPfSGNbN=1i5NKg@mail.gmail.com> <a4cac72b-73a4-0005-b8dc-9a159c9af16a@aklaver.com> <CADep2POfGL-axLe+wWgxoqPomWM0qMW93zyN_5zypDduAUVA7g@mail.gmail.com> <fcdac771-943a-8e9b-45c1-c1dd60f2cf13@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox