Re: C-language stored function and float4 type - Mailing list pgsql-general

From Tom Lane
Subject Re: C-language stored function and float4 type
Date
Msg-id 1552.1381134080@sss.pgh.pa.us
Whole thread Raw
In response to C-language stored function and float4 type  (whiplash <whiplash@bss.org.ua>)
Responses Re: C-language stored function and float4 type  (whiplash <whiplash@bss.org.ua>)
List pgsql-general
whiplash <whiplash@bss.org.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


pgsql-general by date:

Previous
From: Amit Langote
Date:
Subject: Re: Why there are no max_wal_receivers
Next
From: Toni Helenius
Date:
Subject: Index only select count(*)