Re: Parameterized views proposition
От | Tambet Matiisen |
---|---|
Тема | Re: Parameterized views proposition |
Дата | |
Msg-id | A66A11DBF5525341AEF6B8DE39CDE770088059@black.aprote.com обсуждение исходный текст |
Ответ на | Parameterized views proposition ("Tambet Matiisen" <t.matiisen@aprote.ee>) |
Список | pgsql-sql |
> > "Tambet Matiisen" <t.matiisen@aprote.ee> 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
В списке pgsql-sql по дате отправления: