Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: function not called if part of aggregate



On Sun, Jun 11, 2006 at 10:18:20AM -0700, Craig A. James wrote:
> This works well, but it requires me to actually retrieve the function's 
> value 800 times.

Is this actually a problem?

> So I thought I'd be clever:
> 
>   select count(1) from (select foo_init(value) from foo_init_table order by 
>   value_id) as foo;

Why not just count(foo_init(value))?

/* Steinar */
-- 
Homepage: http://www.sesse.net/



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group