Re: How to hint 2 coulms IS NOT DISTINCT FROM each other

Поиск
Список
Период
Сортировка
Искать
От
Kim Rose Carlsen
Тема
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other
Дата
Msg-id
AM4PR0501MB26104BB0436C438D94D92249C7AC0@AM4PR0501MB2610.eurprd05.prod.outlook.com
Ответ на
Список
Дерево обсуждения
How to hint 2 coulms IS NOT DISTINCT FROM each other Kim Rose Carlsen <krc@hiper.dk>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other John R Pierce <pierce@hogranch.com>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Kim Rose Carlsen <krc@hiper.dk>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Scott Marlowe <scott.marlowe@gmail.com>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Tom Lane <tgl@sss.pgh.pa.us>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Kim Rose Carlsen <krc@hiper.dk>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Merlin Moncure <mmoncure@gmail.com>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Merlin Moncure <mmoncure@gmail.com>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Kim Rose Carlsen <krc@hiper.dk>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Merlin Moncure <mmoncure@gmail.com>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Kim Rose Carlsen <krc@hiper.dk>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Scott Marlowe <scott.marlowe@gmail.com>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Kim Rose Carlsen <krc@hiper.dk>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Merlin Moncure <mmoncure@gmail.com>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Kim Rose Carlsen <krc@hiper.dk>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Merlin Moncure <mmoncure@gmail.com>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Kim Rose Carlsen <krc@hiper.dk>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Merlin Moncure <mmoncure@gmail.com>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Alban Hertroys <haramrae@gmail.com>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Merlin Moncure <mmoncure@gmail.com>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other Kim Rose Carlsen <krc@hiper.dk>
Re: How to hint 2 coulms IS NOT DISTINCT FROM each other "David G. Johnston" <david.g.johnston@gmail.com>

> try this :-D

create or replace function indf(anyelement, anyelement) returns anyelement as
$$
  select $1 = $2 or ($1 is null and $2 is null);
$$ language sql;

CREATE VIEW view_circuit_with_status AS (
   SELECT r.*,
          s.circuit_status,
          s.customer_id AS s_customer_id,
          p.line_speed,
          p.customer_id AS p_customer_id
     FROM view_circuit r
     JOIN view_circuit_product_main s
       ON r.circuit_id = s.circuit_id
      AND indf(r.customer_id, s.customer_id)
     JOIN view_circuit_product p
       ON r.circuit_id = p.circuit_id
      AND indf(r.customer_id, s.customer_id)

merlin

This doesn't do much good. This doesn't tell the planner that the 3 customer_ids are actually of same value, and it therefore can't filter them as it sees fit.
В списке pgsql-general по дате отправления
От: Kiran
Дата:
От: Scott Marlowe
Дата:
FAQ