BUG #17060: ERROR: column "rownum" does not exist

Started by PG Bug reporting formalmost 5 years ago4 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 17060
Logged by: dhanabakeeswari v
Email address: dhanabakeeswari15@gmail.com
PostgreSQL version: 11.12
Operating system: Red Hat Enterprise Linux Server (7.8 version)
Description:

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.

#2David Rowley
dgrowleyml@gmail.com
In reply to: PG Bug reporting form (#1)
Re: BUG #17060: ERROR: column "rownum" does not exist

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

#3Pantelis Theodosiou
ypercube@gmail.com
In reply to: PG Bug reporting form (#1)
Re: BUG #17060: ERROR: column "rownum" does not exist

On Wed, Jun 16, 2021 at 11:41 AM PG Bug reporting form <
noreply@postgresql.org> wrote:

The following bug has been logged on the website:

Bug reference: 17060
Logged by: dhanabakeeswari v
Email address: dhanabakeeswari15@gmail.com
PostgreSQL version: 11.12
Operating system: Red Hat Enterprise Linux Server (7.8 version)
Description:

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.

This is (much likely) not a bug. ROWNUM is a pseudo column that is specific
in Oracle SQL. You can't solve this without modifying your query (eg using
ROW_NUMBER() window function).

Best regards

Pantelis Theodosiou

#4dhanabakeeswari v
dhanabakeeswari15@gmail.com
In reply to: Pantelis Theodosiou (#3)
Re: BUG #17060: ERROR: column "rownum" does not exist

Hi
im facing com.edb.util.PSQLException: Cannot commit when autoCommit is
enabled.
could you please help me to solve this?

On Wed, Jun 16, 2021 at 4:18 PM Pantelis Theodosiou <ypercube@gmail.com>
wrote:

Show quoted text

On Wed, Jun 16, 2021 at 11:41 AM PG Bug reporting form <
noreply@postgresql.org> wrote:

The following bug has been logged on the website:

Bug reference: 17060
Logged by: dhanabakeeswari v
Email address: dhanabakeeswari15@gmail.com
PostgreSQL version: 11.12
Operating system: Red Hat Enterprise Linux Server (7.8 version)
Description:

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.

This is (much likely) not a bug. ROWNUM is a pseudo column that is
specific in Oracle SQL. You can't solve this without modifying your query
(eg using ROW_NUMBER() window function).

Best regards

Pantelis Theodosiou