From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
---|---|
To: | Oleg <evdakov(at)iwg(dot)uka(dot)de> |
Cc: | Richard Broersma Jr <rabroersma(at)yahoo(dot)com>, pgsql-novice(at)postgresql(dot)org |
Subject: | Re: increment counter in VIEW |
Date: | 2006-07-12 19:19:55 |
Message-ID: | 20060712191955.GC29575@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Wed, Jul 12, 2006 at 17:03:01 +0200,
Oleg <evdakov(at)iwg(dot)uka(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | tlm | 2006-07-13 00:49:03 | cron job failing with 'database "xyz" is being accessed by other users' errors |
Previous Message | Sean Davis | 2006-07-12 19:16:21 | Re: postgre linkage with non-postgre db |