Re: [BUG] views and functions on relations

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alex Pilosov <alex(at)pilosoft(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [BUG] views and functions on relations
Date: 2001-04-19 02:47:49
Message-ID: 17513.987648469@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alex Pilosov <alex(at)pilosoft(dot)com> writes:
> Here's more info on the bug:
> background: function cust_name(customers) returns varchar;
> Query in question:

> SELECT
> cust_name(a)
> FROM customers AS a, addresses AS b
> WHERE
> b.cust_id=a.cust_id
> and b.oid=get_billing_record(a.cust_id)
> and cust_balance(a.cust_id)>0

I think I see the problem. Is your query being executed via a mergejoin
plan with an explicit sort on customers? Does the failure go away if
you force a nestloop join?

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2001-04-19 02:51:54 Re: Re: No printable 7.1 docs?
Previous Message Philip Warner 2001-04-19 02:30:55 Re: Re: [BUG?] tgconstrrelid doesn't survive a dump/restore