Re: Planning error in dynamic string creation in plpgsql - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Planning error in dynamic string creation in plpgsql
Date
Msg-id 52CA34C1.9090904@gmail.com
Whole thread Raw
In response to Re: Planning error in dynamic string creation in plpgsql  (Keith Fiske <keith@omniti.com>)
Responses Re: Planning error in dynamic string creation in plpgsql
List pgsql-general
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.klaver@gmail.com


pgsql-general by date:

Previous
From: Keith Fiske
Date:
Subject: Re: Planning error in dynamic string creation in plpgsql
Next
From: Adrian Klaver
Date:
Subject: Re: Planning error in dynamic string creation in plpgsql