Re: [GENERAL] auto-increment in a view

2009-09-03 Thread Willy-Bas Loos
> Just a wild notion, but would the generate_series function be any use to > you? Good idea, but i can't get it to work. create or replace view testview3 as ( select generate_series(1,(select count(*) from test group by "value")), value from test group by value); select * from testview3 limit 5;

Re: [GENERAL] auto-increment in a view

2009-09-03 Thread Adam Rich
Willy-Bas Loos wrote: Hi, I'm trying to figure out to generate a auto-increment column in a view. There is no physical column to base it on, the view contains a group by clause, which renders that impossible. In a normal query i can create a sequence for that purpouse and drop it afterwards, but

Re: [GENERAL] auto-increment in a view

2009-09-03 Thread Raymond O'Donnell
On 03/09/2009 17:22, Willy-Bas Loos wrote: > Hi, > > I'm trying to figure out to generate a auto-increment column in a view. > There is no physical column to base it on, the view contains a group > by clause, which renders that impossible. > In a normal query i can create a sequence for that purpo

[GENERAL] auto-increment in a view

2009-09-03 Thread Willy-Bas Loos
Hi, I'm trying to figure out to generate a auto-increment column in a view. There is no physical column to base it on, the view contains a group by clause, which renders that impossible. In a normal query i can create a sequence for that purpouse and drop it afterwards, but apart form it being ugl