Re: C-language stored function and float4 type

From: whiplash <whiplash(at)bss(dot)org(dot)ua>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: C-language stored function and float4 type
Date: 2013-10-16 10:44:01
Message-ID: 525E6DF1.9000404@bss.org.ua
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sorry, I created an overloaded function and forgot about it.
> whiplash <whiplash(at)bss(dot)org(dot)ua> writes:
>> Hello! I have C-language stored function like this:
>> CREATE FUNCTION testfunc ( x real, y real )
>> RETURNS real AS
>> 'testfunc'
>> LANGUAGE C STRICT;
>> If i use this function (SELECT testfunc ( 0.1, 0.2 )) I get result with
>> type "double precision".
> What's your basis for asserting that? The function is clearly defined
> to return float4.
>
> regards, tom lane
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rory Campbell-Lange 2013-10-16 13:56:04 ident authentication problems postgresql 9.2
Previous Message Albe Laurenz 2013-10-16 10:26:33 Re: Invalid Page Header Error