Re: Execute SQL statements with 'context'/predefined variables
| От | chester c young |
|---|---|
| Тема | Re: Execute SQL statements with 'context'/predefined variables |
| Дата | |
| Msg-id | 692669.75275.qm@web54306.mail.re2.yahoo.com обсуждение |
| Ответ на | Execute SQL statements with 'context'/predefined variables ("blay bloo" <blaybloo@googlemail.com>) |
| Список | pgsql-sql |
> I was wondering if it is possible to set the 'context' for running an
> sql command
Oracle has a Context('varname') that returns the value of varname for
the session. to best of my knowledge pg has nothing like this.
> I guess bottom line, is it possible to execute a bunch of SQL
> statements with some predefined variables?
you could use rules to inject you constants as long as you were dealing
with known tables/views; you'd have to rewrite the rules each time the
constants changed; the rules are not session oriented - each sessions
would use the same rule.
(if you have not used pg rules imho you are in for a very pleasant
surprise.)
____________________________________________________________________________________
Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
В списке pgsql-sql по дате отправления: