On Wed, 2005-07-13 at 04:13, Aaron Bingham wrote:
> Hello,
>
> I've got an interesting problem: I need to select all possible values
> of an attribute that do /not/ occur in the database.
>
> This would be easy (in my case at least) if there were a way to
> generate a table containing all integer
I use the following function which returns a date series. You can modify it to
return an int series instead
create or replace function alldates(date,date) returns setof date
as
'
declare
s alias for $1;
e alias for $2;
d date;
begin
d := s;
while d <= e
On Jul 13, 2005, at 6:13 PM, Aaron Bingham wrote:
This would be easy (in my case at least) if there were a way to
generate a table containing all integers between 1 and n, where n is
the result of a subquery. In my case, n will be at most a few
hundred. I would like to be able to generate thi