Re: [GENERAL] Stored procedure advice needed

2003-08-22 Thread Robert Treat
This sounds an awful lot like crosstab functionality, Check out the tablefunc module in contrib, I think there is something in there that will help you with this. Robert Treat On Thu, 2003-08-21 at 16:11, Stephan Szabo wrote: > > On Thu, 21 Aug 2003, Egor Shipovalov wrote: > > > I have a lot of

Re: [GENERAL] Stored procedure advice needed

2003-08-21 Thread Stephan Szabo
On Thu, 21 Aug 2003, Egor Shipovalov wrote: > I have a lot of tables of the same structure that represent weekly states of > a certain system. I'd like to write a function that would take field name, > number of weeks and return history of that field values as a single row. I > imagine something

[GENERAL] Stored procedure advice needed

2003-08-21 Thread Egor Shipovalov
I have a lot of tables of the same structure that represent weekly states of a certain system. I'd like to write a function that would take field name, number of weeks and return history of that field values as a single row. I imagine something like this: SELECT * FROM history('temperature', 10);