I it difficult to understand exactly how the query can use the left and right operands combined with the function name?Given the explain on the query I notice the following lines:
-> Index Scan using pg_proc_oid_index on pg_proc po (cost=0.00..5.98 rows=1 width=68)
Index Cond: (po.oid = ("outer".oprcode)::oid)
-> Index Scan using pg_proc_oid_index on pg_proc pr (cost=0.00..5.98 rows=1 width=68)
Index Cond: (pr.oid = ("outer".oprrest)::oid)
-> Index Scan using pg_proc_oid_index on pg_proc pj (cost=0.00..5.98 rows=1 width=68)
Index Cond: (pj.oid = ("outer".oprjoin)::oid)
Now how does for example ("outer".oprcode)::oid get converted to an oid using the function name and the left and right operands?
For the best of my knowledge it has to be converted via the function 'regprocin' as there are no arguments in the 'oprcode' column.
I know my SQL isn't the best, and I therefore apologise if I have missunderstood something basic here, but I don't see where the operands get combnied so the the oid can be found via function 'regprocedurein'.
You're right, it doesn't - but then pgAdmin doesn't care anyway. All it's trying to do is display the function name and the operand types. oprcode is adequate to get the correct function name (though not the exact signature), and the left and/or right operands come from oprleft/oprright.
Anyway, the following patch appears to get rid of the error, and leave things looking correct on my system:
Index: pgOperator.cpp
===================================================================
RCS file: /disk1/cvsroot/pgadmin3/src/schema/pgOperator.cpp,v
retrieving revision 1.16
diff -r1.16 pgOperator.cpp
148c148
< wxT(" po.proname as operproc, pj.proname as joinproc, pr.proname as restrproc, description\n")
---
> wxT(" op.oprcode as operproc, op.oprjoin as joinproc, op.oprrest as restrproc, description\n")
159,161d158
< wxT(" JOIN pg_proc po ON po.oid=op.oprcode\n")
< wxT(" LEFT OUTER JOIN pg_proc pr ON pr.oid=op.oprrest\n")
< wxT(" LEFT OUTER JOIN pg_proc pj ON pj.oid=op.oprjoin\n")
Look OK to you Andreas?
Regards, Dave.