Re: sql query with join and parameter in postgresql function - Mailing list pgsql-sql

From Philippe Lang
Subject Re: sql query with join and parameter in postgresql function
Date
Msg-id 6C0CF58A187DA5479245E0830AF84F420AFA28@poweredge.attiksystem.ch
Whole thread Raw
In response to sql query with join and parameter in postgresql function  ("Philippe Lang" <philippe.lang@attiksystem.ch>)
List pgsql-sql
> > I thought a view would be more appropriate, but
> > if I'm not wrong, a view does not accept any parameter
> > as input...
>
> 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


pgsql-sql by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: sql query with join and parameter in postgresql function
Next
From: Yuri Gordienko
Date:
Subject: count(*) from cursor