2008/6/5 Tom Lane <tgl@sss.pgh.pa.us>:
> "Pavel Stehule" <pavel.stehule@gmail.com> writes:
>> postgres=# select array_fill('p',array[4,4]);
>> ERROR: could not determine polymorphic type because input has type "unknown"
>
> [ shrug... ] I don't really see a problem with that.
you have t cast in most common case
>
>> I can use hack:
>> CREATE OR REPLACE FUNCTION array_fill(dv text, dims int[])
>> RETURNS text[]
>
> This would be a bad idea, I think; what will happen with
>
> array_fill(null, array[1,2])
>
> I think we *want* that to throw error rather than defaulting to text.
>
> regards, tom lane
>
ok
Pavel