Обсуждение: aggregates' INITCOND='' doesn't display in SQL pane

Поиск
Список
Период
Сортировка

aggregates' INITCOND='' doesn't display in SQL pane

От
Marcin Stępnicki
Дата:
Hello.

Let's create a simple, not very useful function and aggregate:

create or replace function strcat_pipe(text, text)
returns text as
$$ begin   if $1 = '' then     return $2;   else     return ( $1 || '| ' ) || $2;   end if; end;
$$ language plpgsql volatile;

create aggregate str_sum_pipe(text) ( SFUNC=strcat_pipe, STYPE=text, INITCOND = 'aaa'
);

Now, click on created aggregate and select CREATE SCRIPT. Change the
INITCOND to ''. Save, refresh and look at SQL Pane again. The INITCOND
is missing, which in this particular case means that our aggregate
will always return NULL.

pgAdmin III v. 1.8.2, rev 7032 from Ubuntu 8.04 + PostgreSQL 8.2.11.

Is it a bug or me doing something wrong?

Regards,
Marcin


Re: aggregates' INITCOND='' doesn't display in SQL pane

От
Dave Page
Дата:
On Fri, Feb 27, 2009 at 1:42 PM, Marcin Stępnicki <mstepnicki@gmail.com> wrote:

> Now, click on created aggregate and select CREATE SCRIPT. Change the
> INITCOND to ''. Save, refresh and look at SQL Pane again. The INITCOND
> is missing, which in this particular case means that our aggregate
> will always return NULL.
>
> pgAdmin III v. 1.8.2, rev 7032 from Ubuntu 8.04 + PostgreSQL 8.2.11.
>
> Is it a bug or me doing something wrong?

It's a bug - which is now fixed for the next release.

Thanks!

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com


Re: aggregates' INITCOND='' doesn't display in SQL pane

От
Mark Pierce
Дата:
I am a newbe with PostgreSQL and with pgAdmin so bare with me please. Below you list the steps to fix this issue but I
needthe steps before the "Now, click on created aggregate..." I can not locate this.<br />  <br />  <br /> Also I am
veryimpressed with the response time for this help request!<br />  <br /> Mark <br /> <br />> Date: Fri, 27 Feb 2009
15:06:23+0000<br />> Subject: Re: [pgadmin-support] aggregates' INITCOND='' doesn't display in SQL pane<br />>
From:dpage@pgadmin.org<br />> To: mstepnicki@gmail.com<br />> CC: pgadmin-support@postgresql.org<br />> <br
/>>On Fri, Feb 27, 2009 at 1:42 PM, Marcin Stępnicki <mstepnicki@gmail.com> wrote:<br />> <br />> >
Now,click on created aggregate and select CREATE SCRIPT. Change the<br />> > INITCOND to ''. Save, refresh and
lookat SQL Pane again. The INITCOND<br />> > is missing, which in this particular case means that our
aggregate<br/>> > will always return NULL.<br />> ><br />> > pgAdmin III v. 1.8.2, rev 7032 from
Ubuntu8.04 + PostgreSQL 8.2.11.<br />> ><br />> > Is it a bug or me doing something wrong?<br />> <br
/>>It's a bug - which is now fixed for the next release.<br />> <br />> Thanks!<br />> <br />> -- <br
/>>Dave Page<br />> EnterpriseDB UK: http://www.enterprisedb.com<br />> <br />> -- <br />> Sent via
pgadmin-supportmailing list (pgadmin-support@postgresql.org)<br />> To make changes to your subscription:<br />>
http://www.postgresql.org/mailpref/pgadmin-support<br/> 

Re: aggregates' INITCOND='' doesn't display in SQL pane

От
Dave Page
Дата:
2009/2/27 Mark Pierce <xfree143@hotmail.com>:
> I am a newbe with PostgreSQL and with pgAdmin so bare with me please. Below
> you list the steps to fix this issue but I need the steps before the "Now,
> click on created aggregate..." I can not locate this.

http://archives.postgresql.org/pgadmin-support/2009-02/msg00042.php

> Also I am very impressed with the response time for this help request!

We aim to please :-)

--
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com


Re: aggregates' INITCOND='' doesn't display in SQL pane

От
Marcin Stępnicki
Дата:
2009/2/27 Dave Page <dpage@pgadmin.org>:
>
> It's a bug - which is now fixed for the next release.

Thank you very much. The world has now become a better place ;-)

Regards,
Marcin