[pgpool-general: 4960] Re: CREATE OR REPLACE VIEW configuration_view AS select /*nobalance*/ * from configuration

Сергей Мелехин cpro29a at gmail.com
Wed Aug 31 10:28:16 JST 2016


Hi!
Probably not. It is pgpool, who decides where the query should go, and
pgpool will see 'select * from configuration_view;' - no comment here.
If you are using ORM and it is inconvenient to add comment in one
particular query, try stored function (if your ORM supports it of course).

create or replace function get_config() returns setof configuration as
$$
 select * from configuration;
$$ language sql;

Then you should add get_config to black function list in pgpool config.

С Уважением, Сергей Мелехин.

2016-08-31 1:38 GMT+10:00 Avi Weinberg <AviW at gilat.com>:

> Hi,
>
>
>
> Thanks for the reply.  Will the view that is created like CREATE OR
> REPLACE VIEW configuration_view AS  select  /*nobalance*/  * from
> configuration
>
> guarantees that statements like
>
>
>
> select abc from configuration_view
>
>
>
> will always go to master?
>
>
>
>
>
> Thanks
>
> Avi
> IMPORTANT - This email and any attachments is intended for the above named
> addressee(s), and may contain information which is confidential or
> privileged. If you are not the intended recipient, please inform the sender
> immediately and delete this email: you should not copy or use this e-mail
> for any purpose nor disclose its contents to any person.
>
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20160831/7f3350ee/attachment-0001.html>


More information about the pgpool-general mailing list