Hi,
instead of cast(mostype as varchar) try mostype::varchar
Thanks
Sreelatha
On Sun, Apr 4, 2010 at 10:04 PM, Pavel Stehule wrote:
> 2010/4/4 Scott Geller :
> > Hi
> >
> > I have the following plpgsql function that works:
> >
> > DROP TYPE if exists distr CASCADE;
> > CREATE TYPE distr AS (b
2010/4/4 Scott Geller :
> Hi
>
> I have the following plpgsql function that works:
>
> DROP TYPE if exists distr CASCADE;
> CREATE TYPE distr AS (b bigint, var varchar);
>
> DROP FUNCTION IF EXISTS dist() cascade;
>
> CREATE or replace FUNCTION dist() RETURNS setof distr
> AS $$ begin
> return que