Vlad Seryakov <vlad@crystalballinc.com> writes:
> i just created new database and ran this script.
> First time the query ran okay, then i removed ps.quantity
> and re-created package_tree_view.
> After this the query crashed the server.
Hmm, I see: there's not a defense against references to
no-longer-existing tables/views when the same name has been re-used
for a new table/view. I've fixed this. Thanks for the report!
regards, tom lane