Re: [PATCH] pg_sleep(interval)

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [PATCH] pg_sleep(interval)
Дата
Msg-id 525F021D.9020304@gmx.net
обсуждение исходный текст
Ответ на Re: [PATCH] pg_sleep(interval)  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [PATCH] pg_sleep(interval)  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On 10/16/13 2:40 PM, Robert Haas wrote:
> On Wed, Oct 16, 2013 at 1:26 PM, Josh Berkus <josh@agliodbs.com> wrote:
>> Also, as Tom pointed out, at some point we have to either say we really
>> support overloading or we don't.
> 
> We clearly do support overloading.  I don't think that's at issue.
> But as we all know, using it can cause formerly unambiguous queries to
> become ambiguous and stop working.

But that's not really what this is.  It's one thing to be wary about
adding foo(bigint, int, smallint) when there are already three other
permutations in the system.  (At least in other languages, compilers
will give you warnings or errors when this creates an ambiguity, so
there's no guessing.)  But the problem here is that if there already is a
   foo(type1)

then the proposal to add
   foo(type2)

can always be shot down by

"But this will break foo('type1val')."

That can't be in the spirit of overloading.

The only way to fix this is that at the time when you add foo(type1) you
need to prevent people from being able to call foo('type1val') and
instead require the full syntax foo(type1 'type1val').  The only way to
do that, I think, is to add some other foo(type3) at the same time.
There is just something wrong with that.




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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Auto-tuning work_mem and maintenance_work_mem
Следующее
От: Tomas Vondra
Дата:
Сообщение: FDW API / flow charts for the docs?