Re: Questions about Views, Rules and DBLink

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joao Afonso <joaoaafonso(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, Joe Conway <mail(at)joeconway(dot)com>
Subject: Re: Questions about Views, Rules and DBLink
Date: 2005-08-01 04:19:52
Message-ID: 24410.1122869992@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joao Afonso <joaoaafonso(at)gmail(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2005-08-01 05:45:33 Re: Questions about Views, Rules and DBLink
Previous Message Tom Lane 2005-08-01 04:15:55 Re: postmaster