On Sat, Oct 05, 2002 at 08:17:38PM -0700, Nikolaus Dilger wrote: > Raymond, > > Partitioned tables would solve your issue since you > could just truncate a partiotion in order to delete the > unneeded data. Unfortunately they are not available in > PostgreSQL. But maybe in a future release. > > Unfortunately you also cannot use a UNION ALL in a view > to fake partitions. >
Hmm, you haven't tried this recently, have you? With pgsql 7.2.1, It seems to work just fine: test=# create view transactions as select * from monday union all select * from tuesday union all select * from wednesday ; CREATE test=# \d transactions View "transactions" Column | Type | Modifiers ----------+---------+----------- daynum | integer | transact | integer | View definition: (SELECT monday.daynum, monday.transact FROM monday UNION ALL SELECT tuesday.daynum, tuesday.transact FROM tuesday) UNION ALL SELECT wednesday.daynum, wednesday.transact FROM wednesday; test=# select * from transactions; daynum | transact --------+---------- 1 | 1 1 | 2 1 | 3 2 | 4 2 | 5 2 | 6 (6 rows) test=# Ross ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly