X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 261E5D1B441 for ; Fri, 16 Jan 2004 13:03:55 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 30462-10 for ; Fri, 16 Jan 2004 09:03:27 -0400 (AST) Received: from poweredge.attiksystem.ch (unknown [212.147.59.29]) by svr1.postgresql.org (Postfix) with ESMTP id D9665D1DA98 for ; Fri, 16 Jan 2004 09:03:23 -0400 (AST) content-class: urn:content-classes:message Subject: Re: sql query with join and parameter in postgresql function MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Fri, 16 Jan 2004 14:03:26 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 Message-ID: <6C0CF58A187DA5479245E0830AF84F420AFA28@poweredge.attiksystem.ch> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [SQL] sql query with join and parameter in postgresql function Thread-Index: AcPcJhLjDZBKJBeNQMqU165dcEB0ewACt4LA From: "Philippe Lang" To: Cc: "Michael Glaesemann" X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/139 X-Sequence-Number: 16532 > > I thought a view would be more appropriate, but > > if I'm not wrong, a view does not accept any parameter > > as input... >=20 > But you can just define the view and select it with a WHERE clause with > your parameter, just like a normal table. Would that help? Thanks! That's perfect. I join in a view, and limit in a function, with a WHERE clause. And no need for any redundant composite type, although I agree this is not that complicated to use... Philippe Lang