Re: dynamic rules? - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: dynamic rules?
Date
Msg-id 20040604181823.GA20549@wolff.to
Whole thread Raw
In response to Re: dynamic rules?  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-sql
On Fri, Jun 04, 2004 at 09:16:04 -0700, Christopher Dedels <cdedels@mygeotivity.com> wrote:
> Bruno,
> 
> Thanks for the response.

You should keep the discussion copied to the list as long as it is on topic.
That way other people can help out.

> I was wondering if I was possible to union the tables if necessary.  So, if
> I choose type=1 it selects from only the 'one' table and likewise with 2.
> However, if I query type=1 or type=2 it will union the two and return the
> results from both tables.

That is a planner issue. I suspect that currently postgres won't be able
to see that a union isn't necessary. However unless performance is a real
problem for you, you are better off using simpler code to help maintainance.


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Difference between two times as a numeric value in a stored procedure.
Next
From: "Rein Petersen"
Date:
Subject: ANSI SQL-99 SYNTAX and "WITH"