Search Postgresql Archives

Running queries or functions stored in a table.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



List,

I have a requirement to write a query that lists a set of attribute/value pairs, but the values need to be dynamically created on the fly from another query or function. Is it possible to have a table like this:

Attribute   |   Value
-------------------------
Attrib1     |   select val1, val1 from table;
Attrib2     |   func()

return this:

Attribute   |   Value
-------------------------
Attrib1     |   result1
Attrib2     |   result2

If this is possible? How would I go about it? I'm thinking pl/pgsql and execute() but I'm not sure.

Any thoughts?

schu

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
   (send "unregister YourEmailAddressHere" to majordomo@xxxxxxxxxxxxxx)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux