Search code examples
postgresqloracle-sqldeveloper

run \dt in oracle sqldeveloper for PostgreSQL


I configured PostgreSQL for Oracle SQL developer.

I just tried to run the command \dt; from the worksheet and received below error

Error starting at line : 1 in command -
\dt 
Error report -
SQL Error: ERROR: syntax error at or near "\"
  Position: 1

Could you please advise how to run the commonly used psql commands from worksheet in Oracle SQL developer. Edit1: Are there any alternative equivalent for such psql command for oracle sql developer please. Thanks.


Solution

  • Doesn't SQL Developer offer a GUI view that provides the same info as \dt does? That is its job, afterall, and the point of using a GUI.

    You can start psql with the -E option, then it will show you the SQL it executes to get the data behind the various backslash commands. You can then capture and run those queries in something else, like (presumably, I haven't tried it) SQL Developer.