from string to table...?
От | will trillich |
---|---|
Тема | from string to table...? |
Дата | |
Msg-id | 20010323005751.A16314@mail.serensoft.com обсуждение исходный текст |
Ответы |
Re: from string to table...?
|
Список | pgsql-general |
let's say you have the name of a table in a string. 'mytable' you also have field names, such as 'lookupfield' 'valuefield' which would be assembled like this select valuefield from mytable where lookupfield = '?' is there a way to write sql/plpgsql that'll take a varchar argument (table and field names) and be able to turn it into the appropriate query? i can see pg_class contains table info and pg_attribute has info for the fields ... is there a way (oids maybe?) to direct postgres to the right table for a search, given the name of the table in a varchar string? (and if so, how? :) -- It is always hazardous to ask "Why?" in science, but it is often interesting to do so just the same. -- Isaac Asimov, 'The Genetic Code' will@serensoft.com http://newbieDoc.sourceforge.net/ -- we need your brain! http://www.dontUthink.com/ -- your brain needs us!
В списке pgsql-general по дате отправления: