Re: in query variables....
От | Ismael .... |
---|---|
Тема | Re: in query variables.... |
Дата | |
Msg-id | BLU103-W3329FBCB989E6AB4A46DB9A38E0@phx.gbl обсуждение исходный текст |
Ответ на | in query variables.... ("Rhys A.D. Stewart" <rhys.stewart@gmail.com>) |
Список | pgsql-general |
> > Hi all, > > this is from the is there a way file. > Is there a way to get the name of the relation or relations in a query > from within the query? Like some kind of magic variable...? > for example : > "select *, from thistable" > where would be replaced by thistable. > > > Rhys > Peace & Love|Live Long & Prosper > No as far as I know, but you can create a stored procedure and pass as parameter the table and then "create" your own query and execute it from within the stored procedure http://www.postgresql.org/docs/8.2/static/plpgsql-statements.html EXECUTE 'UPDATE '|| some_magic_variable || ' SET ' || quote_ident(colname) || ' = ' || quote_literal(newvalue) || ' WHERE key = ' || quote_literal(keyvalue); I haven't tried it thought. _________________________________________________________________ Tenemos lo que búscas…JUEGOS. http://club.prodigymsn.com/
В списке pgsql-general по дате отправления: