Re: BUG #17060: ERROR: column "rownum" does not exist - Mailing list pgsql-bugs

From David Rowley
Subject Re: BUG #17060: ERROR: column "rownum" does not exist
Date
Msg-id CAApHDvpj2k2odcw6XTeMVzjQRGnG2_dtjcisMXS9meBiTJ8Zrg@mail.gmail.com
Whole thread Raw
In response to BUG #17060: ERROR: column "rownum" does not exist  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
On Wed, 16 Jun 2021 at 22:41, PG Bug reporting form
<noreply@postgresql.org> wrote:
> Migrated the data from the oracle database to the PostgreSQL database.
> While accessing the query I am facing "org.postgresql.util.PSQLException:
> ERROR: column "rownum" does not exist".
> Without query changes how to resolve this.

It looks like you might have to do a bit more work to properly migrate
your application to PostgreSQL.

PostgreSQL uses more standardized ways to limit the number of records
returned by a query. The last time I used Oracle it did not follow the
SQL standard way of doing that.

With PostgreSQL, you should use either the standard FETCH FIRST syntax
or the LIMIT syntax, which predates the SQL standard.
https://www.postgresql.org/docs/11/sql-select.html#SQL-LIMIT

Since this is not a bug, please divert any follow-up questions to the
pgsql-general mailing list.

David



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #17060: ERROR: column "rownum" does not exist
Next
From: Pantelis Theodosiou
Date:
Subject: Re: BUG #17060: ERROR: column "rownum" does not exist