Re: rw_redis_fdw: SQL Errors when statement is within a function

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: GPT <gptmailinglists(at)gmail(dot)com>
Cc: Christoph Moench-Tegeder <cmt(at)burggraben(dot)net>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: rw_redis_fdw: SQL Errors when statement is within a function
Date: 2018-10-27 19:00:53
Message-ID: fcdac771-943a-8e9b-45c1-c1dd60f2cf13@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2018-10-27 19:02:12 Re: Ltree: set of allowed charcters is limited to [A-Za-z0-9_]. Could the dash "-" be included?
Previous Message David G. Johnston 2018-10-27 16:14:43 Re: Ltree: set of allowed charcters is limited to [A-Za-z0-9_]. Could the dash "-" be included?