Re: Planning error in dynamic string creation in plpgsql

From: Keith Fiske <keith(at)omniti(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: PGSQL Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Planning error in dynamic string creation in plpgsql
Date: 2014-01-06 04:56:08
Message-ID: CAG1_KcC6oKQ268qeY9yLHeCG3EV31PNaCFqM6tZd3sGmHFTa7w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

That is not an option either. This is for a publicly released extension and
I'm really not going to go requiring another scripting language be
installed, especially an untrusted one.

--
Keith Fiske
Database Administrator
OmniTI Computer Consulting, Inc.
http://www.keithf4.com

On Sun, Jan 5, 2014 at 11:44 PM, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>wrote:

> On 01/05/2014 08:34 PM, Keith Fiske wrote:
>
>> Actually, that doesn't work right. Gives weird results when the column
>> is an integer
>>
>> Example:
>>
>> keith=# select min(col1), max(col1) from
>> partman_test.time_static_table_p2014_01_01;
>> min | max
>> -----+-----
>> 86 | 100
>> (1 row)
>>
>> keith=# select min(col1::text), max(col1::text) from
>> partman_test.time_static_table_p2014_01_01;
>> min | max
>> -----+-----
>> 100 | 99
>> (1 row)
>>
>
>
> Should have added to my previous post, that when I want to deal with truly
> dynamic values I use plpythonu. plpgsql is very useful but it does not like
> types changing under it. plpythonu deals with that better.
>
>
>
>>
>>
>> --
>> Keith Fiske
>> Database Administrator
>> OmniTI Computer Consulting, Inc.
>> http://www.keithf4.com
>>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)gmail(dot)com
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Erik Darling 2014-01-06 05:13:28 Dynamic SQL - transition from ms to pg
Previous Message Pavel Stehule 2014-01-06 04:53:44 Re: Planning error in dynamic string creation in plpgsql