0

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.

Dale K
  • 25,246
  • 15
  • 42
  • 71
kate
  • 1
  • 1
  • Does this answer your question? [Create Alias for PostgreSQL Table](https://stackoverflow.com/questions/23300003/create-alias-for-postgresql-table) – Andreas May 14 '20 at 03:40

1 Answers1

0

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.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263