Re: Questions about Views, Rules and DBLink

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: Questions about Views, Rules and DBLink
Дата
Msg-id 42EDB6FD.3080002@joeconway.com
обсуждение исходный текст
Ответ на Re: Questions about Views, Rules and DBLink  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:
> Joao Afonso <joaoaafonso@gmail.com> writes:
>
>>  So (finally), my question is why does this happen? Using instead on
>>the users_util insert rule shouldn't discard the original query and
>>rewrite it according to the specified on the rule?? Is this a problem
>>of dblink?
>
> I hadn't noticed the dblink_current_query() function before, but now
> that I see it, I consider it a pretty bad idea.  It certainly will not
> help you the way you are hoping, because what it returns is the text of
> the interactive command the backend is currently working on --- which
> could be indefinitely far removed from the operation your rule is firing
> for.
>

When it was added (and discussed on the lists) it was also acknowledged
that it would not be useful in all situations. However, there was at
least one use case where it worked as intended and needed.

Joe


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Questions about Views, Rules and DBLink
Следующее
От: Chris Travers
Дата:
Сообщение: New MySQL to PostgreSQL Migration Guide