pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #7831: user defined-aggregated don't set initcond to null when unspecified, instead uses its first argument
3+ messages / 3 participants
[nested] [flat]

* BUG #7831: user defined-aggregated don't set initcond to null when unspecified, instead uses its first argument
@ 2013-01-28 03:19  acamari@verlet.org
  0 siblings, 1 reply; 3+ messages in thread

From: acamari@verlet.org @ 2013-01-28 03:19 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      7831
Logged by:          Abel Abraham Camarillo Ojeda
Email address:      acamari@verlet.org
PostgreSQL version: 9.1.2
Operating system:   OpenBSD-5.1/amd64.MP
Description:        

user defined-aggregated don't set initcond to null when unspecified, instead
uses its first argument.

To reproduce:

$ 
$ cat > /tmp/sql
create or replace function
_foo (state double precision, i double precision)
returns double precision language sql immutable strict as
$$
        select 999::double precision;
$$;

create aggregate foo (double precision) (
    sfunc = _foo,
    stype = double precision
);

select foo(0);
$ 
$ psql -U postgres template1 < /tmp/sql
CREATE FUNCTION
CREATE AGGREGATE
 foo 
-----
   0
(1 row)

$
$ psql -U postgres template1
psql (9.1.2)
Type "help" for help.

template1=# 



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #7831: user defined-aggregated don't set initcond to null when unspecified, instead uses its first argument
@ 2013-01-28 04:53  Tom Lane <tgl@sss.pgh.pa.us>
  parent: acamari@verlet.org
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2013-01-28 04:53 UTC (permalink / raw)
  To: acamari@verlet.org; +Cc: pgsql-bugs

acamari@verlet.org writes:
> user defined-aggregated don't set initcond to null when unspecified, instead
> uses its first argument.

And your point is?

AFAICS this is the documented behavior when the transition function
is strict.  See
http://www.postgresql.org/docs/9.1/static/sql-createaggregate.html
6th paragraph under "Description".

			regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #7831: user defined-aggregated don't set initcond to null when unspecified, instead uses its first argument
@ 2013-01-28 05:10  Abel Abraham Camarillo Ojeda <acamari@verlet.org>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Abel Abraham Camarillo Ojeda @ 2013-01-28 05:10 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs

On Sun, Jan 27, 2013 at 10:53 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> acamari@verlet.org writes:
>> user defined-aggregated don't set initcond to null when unspecified, instead
>> uses its first argument.
>
> And your point is?
>
> AFAICS this is the documented behavior when the transition function
> is strict.  See
> http://www.postgresql.org/docs/9.1/static/sql-createaggregate.html
> 6th paragraph under "Description".
>
>                         regards, tom lane

Oh sorry...

I think that I didn't read that reference enough times, I was mistaken.

Thank you, sorry for the noise...


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2013-01-28 05:10 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-01-28 03:19 BUG #7831: user defined-aggregated don't set initcond to null when unspecified, instead uses its first argument acamari@verlet.org
2013-01-28 04:53 ` Tom Lane <tgl@sss.pgh.pa.us>
2013-01-28 05:10   ` Abel Abraham Camarillo Ojeda <acamari@verlet.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox