Re: Should PG backend know how to represent metadata?
От | Tom Lane |
---|---|
Тема | Re: Should PG backend know how to represent metadata? |
Дата | |
Msg-id | 3325.963845206@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Should PG backend know how to represent metadata? (Philip Warner <pjw@rhyme.com.au>) |
Ответы |
Re: Should PG backend know how to represent
metadata?
|
Список | pgsql-hackers |
Philip Warner <pjw@rhyme.com.au> writes: > I don't think we have functions that return multiple rows, We do, although they're a bit unwieldy to use; might be better to avoid that feature. I'd be inclined to avoid the issue, and just have the function return one result (which might contain newlines for readability of course). > and a 'select' > without a 'from' is not strictly legal, It is in postgres, and this is hardly SQL-standard-based anyway... > Which brings me to my next idea: > select defn from pg_dump where type='table and name = 'foo' > or > select related_items from pg_dump where type='table and name = 'foo' > where pg_dump can be implemented via a rewrite rule....maybe. The rewrite rule couldn't do any of the heavy lifting; it'd still end up calling a function. A view like pg_rules might not be a bad idea, but you should plan on exposing the underlying function for flexibility. regards, tom lane
В списке pgsql-hackers по дате отправления: