#436 fail to insert, update via sql box

5.1
open
nobody
General (123)
5
2015-05-06
2013-05-03
woodz
No

when I put the command (while "Paginate results" is checked)
update mytable set id = 6 -- just a simple table, 2 columns are enough, e.g. id as integer and name as varchar
into the SQL box, an error is generated saying:

SQL error:

ERROR: syntax error at or near "set"
LINE 1: SELECT COUNT(*) AS total FROM (update mytable set dn_id = ...
^

In statement:
SELECT COUNT(*) AS total FROM (update mytable set dn_id = 6) AS sub

I can put the command above into an external sql and open by Browse.., that will do.
If I do in SQL box while "Paginate results" is un-checked, it will do also.
Similar results for insert-command.

Thanks for review.
woodz

Discussion

  • woodz
    woodz
    2013-05-03

    sorry did a mistake, you need to replace dn_id by id in sql error report

     
  • Aneta Rosłan
    Aneta Rosłan
    2015-05-06

    I have similar problem with pagination.

    == Scenario 1. ==
    1. Doing
    - "Paginate result" checked
    - trying to execute:
    INSERT INTO "Foo" ("FK", name) VALUES (1,'bar');

    1. Expected:
      execute query: insert values

    2. Unexpected result
      I got an error:
      ERROR: syntax error at or near "INTO"
      LINE 1: SELECT COUNT(*) AS total FROM (INSERT INTO "Foo" ("FK", ...

    == Scenario 2. ==
    When "Paginate result" unchecked, then it works as expected

    == Additional info ==
    phpPgAdmin 5.1 (PHP 5.3.27), PostgreSQL 9.3.4

     
    Last edit: Aneta Rosłan 2015-05-06