Re: GRANT ON ALL IN schema
От | Sam Mason |
---|---|
Тема | Re: GRANT ON ALL IN schema |
Дата | |
Msg-id | 20090816014819.GT5407@samason.me.uk обсуждение исходный текст |
Ответ на | Re: GRANT ON ALL IN schema (Peter Eisentraut <peter_e@gmx.net>) |
Список | pgsql-hackers |
On Sun, Aug 16, 2009 at 02:15:39AM +0300, Peter Eisentraut wrote: > On 2009-08-15 at 23:31 +0100, Sam Mason wrote: > > Next all you need is to be able to PREPARE them (and somehow access the > > parameters from execute) and you'll have nice local functions. :) > > Yeah, rather than just making up some new command for "execute this > string", this could be generalized as lambda expressions that could be > called whereever an expression is allowed. E.g. > > SELECT LAMBDA $$ ... $$; [..] > SELECT (LAMBDA (x int, y text) $$ ... $$) (37, 'foo'); I can't quite tell if you're being serious or not, you realize that this leaves open the possibility of doing: SELECT t.n, f.op, f.fn(t.n) FROM generate_series(1,10) t(n), (VALUES ('id',LAMBDA (_x int) $$ BEGIN; RETURN _x; END;$$), ('*2',LAMBDA (_x int) $$ BEGIN; RETURN _x*2; END; $$)) f(op,fn) And of storing lambda abstractions in tables? -- Sam http://samason.me.uk/
В списке pgsql-hackers по дате отправления: