To stay SQL-standard compliant, you could use a table from the information schema. The manual:
The information schema is defined in the SQL standard and can
therefore be expected to be portable and remain stable
For simplicity I suggest
information_schema.information_schema_catalog_name. The manual:
information_schema_catalog_name is a table that always contains one
row and one column containing the name of the current database
(current catalog, in SQL terminology).
Bold emphasis mine. So:
FROM (SELECT FROM information_schema.information_schema_catalog_name WHERE false) my_empty_table;
SELECT list can be empty since we are not interested in actual columns anyway.
(SELECT FROM information_schema.information_schema_catalog_name LIMIT 0)
LIMIT is not standard syntax, which is:
(SELECT FROM information_schema.information_schema_catalog_name FETCH FIRST 0 ROWS ONLY)
(Needlessly verbose, if you ask me.)
Fully standard SQL, proof of concept, but of limited usefulness. None of the existing RDBMS comply to the standard fully.
Notably, Oracle does not implement the information schema. And more popular RDBMS support the non-standard
LIMIT clause than the standard
FETCH FIRST. Overview in Wikipedia.
The shortest and cheapest non-standard syntax for Postgres is a_horse's first example.