> 
> "Tambet Matiisen" <[EMAIL PROTECTED]> writes:
> > How tough it would be to implement
> 
> > CREATE VIEW xxx PARAMETERS (yyy) AS zzz;
> 
> > as
> 
> > CREATE TYPE xxx;
> > CREATE FUNCTION xxx(yyy) RETURNING SETOF xxx LANGUAGE sql AS 'zzz';
> 
> What's the point?  It'd be nonstandard anyway, so just use 
> the function.
> 
>                       regards, tom lane
> 

1. Cleaner syntax.
2. No possible inconsistencies between return type and query result.
3. No strange quoting, like '' and $$.
4. Just to save some keystrokes.

Another issue, that has to be handled separately:
5. Show up in EXPLAIN as normal query, not function scan.

About standards - maybe it's time to set some standard? :) Now
seriously, maybe it's really not right to call it a parameterized view.
Maybe instead CREATE FUNCTION syntax could be improved somehow, so that
you don't have to CREATE TYPE separately.

  Tambet

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Reply via email to