<blockquote> I seriously doubt a "create or update table" would be
considered by the postgres team, but if you want to persue
it, this is the wrong venue pgsql-hackers or the general
list would be better.
</blockquote>
I'm asking here first to know if this is a crazy idea or not.
<blockquote> There also isn't anything even vaguely like that in any of
the SQL standards I don't think.
</blockquote>
I also think so, but it may help many SQL applications including OpenACS.
<blockquote> You might be able to write a plpgsql function that took
did it but it would be pretty hairy I think (and to be
honest I think the better solution for development is just
having drop scripts that work even if the datamodel is
only part installed).
</blockquote>
They work OK when they are perfect but in case of any problem you can get a broken app.
<blockquote> Helper functions to do things like check for index
existence before creating or dropping an index would be
great to have and would probably make upgrading quite a
bit more robust.
</blockquote>
What about not falling on "create index" (if there's and index do nothing) or "drop index" (if there's no index do nothing)?
What about "update instead of falling on duplicate acs_objects"?