I am migrating this Oracle command to PostgreSQL:
create view DBA_ha as select * from DBA_USER where username!='ha';
create synonym ha.DBA_USER for DBA_ha;
Please suggest to me how I can migrate the SYNONYM command above.
I am migrating this Oracle command to PostgreSQL:
create view DBA_ha as select * from DBA_USER where username!='ha';
create synonym ha.DBA_USER for DBA_ha;
Please suggest to me how I can migrate the SYNONYM command above.
PostgreSQL does not need synonyms, because it has the more flexible search_path
.
To solve your particular problem, create the view in the schema ha
. Anything else would be needlessly complicated.