Re: is it helpful for the optimiser/planner to add LIMIT 1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: "Ivan Sergio Borgonovo" <mail(at)webthatworks(dot)it>, pgsql-general(at)postgresql(dot)org
Subject: Re: is it helpful for the optimiser/planner to add LIMIT 1
Date: 2008-04-03 14:33:56
Message-ID: 29407.1207233236@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> You could fix that more cleanly with "ALTER FUNCTION myfunction ROWS 1" but
> only if that's always true, not just for myfunction(3,5).

Perhaps the function shouldn't be declared SETOF in the first place?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Dunstan 2008-04-03 14:55:39 Re: modules
Previous Message Greg Sabino Mullane 2008-04-03 14:23:02 Re: [GENERAL] SHA1 on postgres 8.3