Re: Chatter on DROP SOMETHING IF EXISTS

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Chatter on DROP SOMETHING IF EXISTS
Дата
Msg-id 20070219121218.GN9724@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Chatter on DROP SOMETHING IF EXISTS  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Chatter on DROP SOMETHING IF EXISTS  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
Bruce Momjian wrote:
> Tom Lane wrote:
> > "Jim C. Nasby" <jim@nasby.net> writes:
> > > On Thu, Feb 08, 2007 at 01:54:13PM -0500, Tom Lane wrote:
> > >> I would be satisfied if the returned command tag were something else,
> > >> maybe "NO OPERATION".
> > 
> > > "TABLE blah DID NOT EXIST" might be less confusing...
> > 
> > You're confusing a command tag with a notice.  In the first place,
> > we shouldn't assume that applications are ready to deal with
> > indefinitely long command tags (the backend itself doesn't think they
> > can be longer than 64 bytes); in the second place, they should be
> > constant strings for the most part so that simple strcmp()s suffice
> > to see what happened.  Command tags are meant for programs to deal
> > with, more than humans.
> 
> Yep.  Because IF EXISTS is in a lot of object destruction commands,
> adding a modified tag seems very confusing, because in fact the DROP
> TABLE did succeed, so to give any other tag seems incorrect.

I don't understand -- what problem you got with "NO OPERATION"?  It
seemed a sound idea to me.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Multiple Storage per Tablespace, or Volumes
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: wishlist items ..