> > Rather than adding another SHOW command, I think using a table > > function is a better idea. That's because the information returned by > > the lock listing code will often need to be correlated with other > > information in the system catalogs, or sorted/aggregated in various > > ways (e.g. "show me the names of all locked relations", or "show me > > the relation with the most AccessShareLocks'"). Written as a table > > function, the lock listing code itself can be fairly simple, and the > > DBA can write the necessary SQL queries to produce the information he > > needs. It also makes it easier to parse the lock status information, > > if you're writing (for example) a GUI admin tool.
Out of interest - why do SRFs need to have a table or view defined that matches their return type? Why can't you just create the type for the function and set it up as a dependency? Chris ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html