Re: increment counter in VIEW - Mailing list pgsql-novice

From Bruno Wolff III
Subject Re: increment counter in VIEW
Date
Msg-id 20060712191955.GC29575@wolff.to
Whole thread Raw
In response to Re: increment counter in VIEW  (Oleg <evdakov@iwg.uka.de>)
List pgsql-novice
On Wed, Jul 12, 2006 at 17:03:01 +0200,
  Oleg <evdakov@iwg.uka.de> wrote:
>
> Without generate_series my View produces 300 records. if I insert
> generate_series then I get 90000 because it tries all possible
> combinations with S.a. I do not know how can I limit it with WHERE.

I don't think generate_series will work well in this case.
If you can do the numbering in the application, that will probably be the
easiest thing to do.

Otherwise you are going to need to get the numbers into the underlying table
or another table that can be joined to the underlying table on a key. And
these numbers will need to be kept up to date. (And deletions will be,
expensive since that will require renumbering rows with higher numbers.)
This also will cause problems for concurrent updates.

pgsql-novice by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: postgre linkage with non-postgre db
Next
From: Sean Davis
Date:
Subject: Re: postgre linkage with non-postgre db