Re: RFC: listing lock status - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: RFC: listing lock status
Date
Msg-id GNELIHDDFBOCMGBFGEFOKEDHCDAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: RFC: listing lock status  (Joe Conway <mail@joeconway.com>)
List pgsql-hackers
>  > 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



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: TODO lock item
Next
From: Joe Conway
Date:
Subject: Re: RFC: listing lock status