Sandro Dentella <sandro(dot)dentella(at)tin(dot)it> writes:> Here is what I do:
Wouldn't it be easier just to look for the pg_index row (if any) thathas indisprimary = true?
regards, tom lane