From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Re: Use int8 for int4/int2 aggregate accumulators? |
Date: | 2001-08-14 16:01:11 |
Message-ID: | 200108141601.f7EG1BG07870@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> >> create function rtest_viewfunc1(int4) returns int4 as
> >> 'select count(*) from rtest_view2 where a = $1'
> >> language 'sql';
> >> + ERROR: return type mismatch in function: declared to return integer, returns bigint
>
> > Maybe instead of testing for strict equality of the types, test for
> > compatibility.
>
> We could try to force-convert the result of an SQL function to the right
> thing, I suppose, but I'm worried that that might mask programmer errors
> more than it helps.
>
> On the other hand, the equivalent forced conversion happens already in
> plpgsql functions; it's only SQL-language functions that are so picky.
> Maybe your idea is good. Anyone else have an opinion?
I don't know. Doing a force for SQL functions and not for others seems
kind of confusing.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Philip Crotwell | 2001-08-14 16:02:03 | LARGE db dump/restore for upgrade question |
Previous Message | Bruce Momjian | 2001-08-14 15:57:19 | Re: PostgreSQL library functions |
From | Date | Subject | |
---|---|---|---|
Next Message | Serguei Mokhov | 2001-08-14 16:10:59 | Re: int8 sequences --- small implementation problem |
Previous Message | Marc G. Fournier | 2001-08-14 15:55:04 | Re: To be 7.1.3 or not to be 7.1.3? |