Re: SQL objects UNITs (was: Extension Templates S03E11)
От | Alvaro Herrera |
---|---|
Тема | Re: SQL objects UNITs (was: Extension Templates S03E11) |
Дата | |
Msg-id | 20131218150501.GA11006@eldon.alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: SQL objects UNITs (was: Extension Templates S03E11) (Stephen Frost <sfrost@snowman.net>) |
Ответы |
Re: SQL objects UNITs (was: Extension Templates S03E11)
|
Список | pgsql-hackers |
Stephen Frost escribió: > * Dimitri Fontaine (dimitri@2ndQuadrant.fr) wrote: > > Basically with building `UNIT` we realise with hindsight that we failed to > > build a proper `EXTENSION` system, and we send that message to our users. > > Little difficult to draw conclusions about what out 'hindsight' will > look like. I haven't been keeping very close attention to this, but I fail to see why extensions are so much of a failure. Surely we can invent a new "kind" of extensions, ones whose contents specifically are dumped by pg_dump. Regular extensions, the kind we have today, still wouldn't, but we could have a flag, say "CREATE EXTENSION ... (WITH DUMP)" or something. That way you don't have to come up with UNIT at all (or whatever). A whole new set of catalogs just to fix up a minor issue with extensions sounds a bit too much to me; we can just add this new thing on top of the existing infrastructure. I didn't much like the WITH UNIT/END UNIT thingy. What's wrong with CREATE foo; ALTER EXTENSION ADD foo? There's a bit of a problem that if you create the object and die before being able to add it to the extension, it would linger unreferenced; but that's easily fixable by doing the creation in a transaction, I think. (Alternatively, we could have a single command that creates the extension and the contained objects in one fell swoop, similar to how CREATE SCHEMA can do it; but I'm not sure that's all that much better, and from a grammar POV it probably sucks.) -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: