Re: [SQL] Select Instead on a table

2004-10-28 Thread Markus Schaber
Hi, Tom, On Thu, 28 Oct 2004 10:22:47 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: > > Is it possible to create a ON SELECT DO INSTEAD rule on a table? > > Not unless you want it to become a view. That's what I suspected, after scanning the docs. Thanks, Markus -- markus schaber | dipl. informa

Re: [SQL] curious delay on view/where

2004-10-28 Thread Gary Stainburn
On Thursday 28 October 2004 3:25 pm, Tom Lane wrote: > Gary Stainburn <[EMAIL PROTECTED]> writes: > > Anyone got any ideas of the cause, or thoughts on how I can trace > > the problem? > > EXPLAIN ANALYZE results for the fast and slow cases would be > interesting. Also, have you ANALYZEd the under

Re: [SQL] extra info - curious delay on view/where

2004-10-28 Thread andre.toscano
Hi Folks, It´s just for curiosity I ask: Could an INDEX speed up that SELECT? Thanks in advance, and sorry for my newbies questions. André (Brazilian User) > On Thursday 28 October 2004 11:16 am, Gary Stainburn wrote: > > Hi folks. > > > > I have the following view: > > > > CREATE VIEW "stock_

Re: [SQL] curious delay on view/where

2004-10-28 Thread Tom Lane
Gary Stainburn <[EMAIL PROTECTED]> writes: > Anyone got any ideas of the cause, or thoughts on how I can trace the > problem? EXPLAIN ANALYZE results for the fast and slow cases would be interesting. Also, have you ANALYZEd the underlying tables lately? And what PG version is this?

Re: [SQL] Select Instead on a table

2004-10-28 Thread Tom Lane
Markus Schaber <[EMAIL PROTECTED]> writes: > Is it possible to create a ON SELECT DO INSTEAD rule on a table? Not unless you want it to become a view. regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lis

Re: [SQL] extra info - curious delay on view/where

2004-10-28 Thread Gary Stainburn
On Thursday 28 October 2004 11:16 am, Gary Stainburn wrote: > Hi folks. > > I have the following view: > > CREATE VIEW "stock_available" as > SELECT * FROM stock_details > WHERE available = true AND visible = true AND > location not in (SELECT descr FROM ignored); > > Stock_details is itself

[SQL] curious delay on view/where

2004-10-28 Thread Gary Stainburn
Hi folks. I have the following view: CREATE VIEW "stock_available" as SELECT * FROM stock_details WHERE available = true AND visible = true AND location not in (SELECT descr FROM ignored); Stock_details is itself a view pulling in a number of tables. Everything works fine until I try to

[SQL] Select Instead on a table

2004-10-28 Thread Markus Schaber
Hello, [I hope this is no FAQ, but I did neither find anything about it in the PostgreSQL FAQ, nor get any hit on RULE or INSTEAD on the mailing list archive search¹...] Is it possible to create a ON SELECT DO INSTEAD rule on a table? All of my tries to do so failed by either complaining that th