Forum OpenACS Q&A: Response to acs_object_id_seq View

Posted by Don Baccus on
That view was made to ease porting, and you've just nailed the one case where it doesn't work.  PG is correctly returning one value in PG 7.2, while in PG 7.2 it incorrectly expanded the view for each row.

Warning: while the PG 7.2 behavior's correct, it's only by chance that it changed, it thinks it's cheaper in this case where in 7.1 it didn't.  So don't depend on either behavior even though the SQL standard makes it clear that views should be built once per statement.

Please submit a patch ASAP so I can squeeze this into 4.5, it's safe and important.  I thought I'd nailed the cases needing changes but apparently didn't.  It's masked in PG 7.1 and that's been my base for testing thus far.