Re: ALTER TABLESPACE MOVE command tag tweak

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: ALTER TABLESPACE MOVE command tag tweak
Дата
Msg-id 20140721151542.GO11811@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: ALTER TABLESPACE MOVE command tag tweak  (Stephen Frost <sfrost@snowman.net>)
Ответы Re: ALTER TABLESPACE MOVE command tag tweak  (Stephen Frost <sfrost@snowman.net>)
Re: ALTER TABLESPACE MOVE command tag tweak  (Stephen Frost <sfrost@snowman.net>)
Re: ALTER TABLESPACE MOVE command tag tweak  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers
Stephen Frost wrote:
> * Tom Lane (tgl@sss.pgh.pa.us) wrote:
> > Stephen Frost <sfrost@snowman.net> writes:
> > > That it's more-or-less a bulk 'ALTER TABLE' operation is why I had been
> > > trying to think of a way to put it under that command.  What if we had a
> > > more general way to reference 'all objects in a tablespace'?
> > > "tablespace.*" or "ALL:TABLESAPCE"?  Are there other places which might
> > > benefit from being able to take and operate on all objects in a
> > > tablespace?
> > 
> > > Of course, we handle this in 'GRANT' with 'GRANT ON ALL TABLES', so why
> > > not 'ALTER TABLE ON ALL TABLES IN TABLESPACE <blah>'?  that does get
> > > pretty darn verbose but is at least a bit more in-line with what we have
> > > done before..
> > 
> > That's not a bad line of thought --- I doubt that verbosity is critical
> > here.
> 
> Alright, sounds like this is more-or-less the concensus.  I'll see about
> making it happen shortly.

Stephen,

Were you able to work on this?

Can you be more specific on the exact grammar you're considering?  The
proposal above,
ALTER TABLE ON ALL TABLES IN TABLESPACE xyz
doesn't seem very good to me.  I would think it'd be more like
ALTER ALL TABLES IN TABLESPACE xyz
but then if you return ALTER TABLE as a command tag that might be a bit
strange.  Maybe
ALTER TABLE ALL IN TABLESPACE xyz
which AFAICS should work since ALL is already a reserved keyword.


Also, how would we document this?  Would we have it in the same page as
all the ALTER TABLE variants, or would we create a separate page for
ALTER TABLE ALL?  Keeping in mind that in the future we might want to
allow things such as ALTER TABLE ALL IN SCHEMA xyz it might be better to
have the selection logic documented neatly in its own little page
instead of together with the ALTER TABLE mess which is already rather
large.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Emre Hasegeli
Дата:
Сообщение: Shapes on the regression test for polygon
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Portability issues in TAP tests