Re: C-language stored function and float4 type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: whiplash <whiplash(at)bss(dot)org(dot)ua>
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-07 08:21:20
Message-ID: 1552.1381134080@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Toni Helenius 2013-10-07 09:23:59 Index only select count(*)
Previous Message Amit Langote 2013-10-07 04:53:17 Re: Why there are no max_wal_receivers