Equivalence of from dual in PostgreSQL

Just use select 1. From documentation

Oracle uses the "fake" dual table for many selects, where in PostgreSQL we can write select just without from part at all. This table was created in postgres as a view to ease porting problems. This allows code to remain somewhat compatible with Oracle SQL without annoying the Postgres parser.


You don't need a FROM clause at all. Just SELECT 1 will do it.


PostgreSQL has implicit DUAL table, just write:

SELECT NOW  ()

Output:    
2019-05-17 13:56:51.120277+02

In case that you Oracle PL/SQL code is referring DUAL table you can create own DUAL table:

CREATE TABLE mydb.public.dual (column1 bool);