In your example, FOOBAR almost certainly a synonym for the public. There is no PUBLIC scheme, but PUBLIC is listed as the owner of a public synonym.
If I create a new public synonym
SQL> create public synonym pub_syn_emp 2 for scott.emp; Synonym created.
the owner of this synonym ends with PUBLIC
SQL> ed Wrote file afiedt.buf 1 select object_name, owner, object_type 2 from dba_objects 3* where object_name = 'PUB_SYN_EMP' SQL> / OBJECT_NAME OWNER OBJECT_TYP -------------------- ---------- ---------- PUB_SYN_EMP PUBLIC SYNONYM
In addition, element number 3 does not look correct. If there is a private synonym pointing to a non-existent object and a public synonym pointing to a valid object, the private synonym still takes precedence. You simply get an error message when Oracle tries to resolve a private synonym for the actual object.
SQL> create synonym syn_emp for scott.no_such_table; Synonym created. SQL> create public synonym syn_emp for scott.emp; Synonym created. SQL> select * from syn_emp; select * from syn_emp * ERROR at line 1: ORA-00980: synonym translation is no longer valid
Justin cave
source share