Menu

#325 [PostgreSQL] Field date in 'Search data in tables' form

3.7.0
closed-fixed
PostgreSQL (42)
5
2021-02-06
2013-05-31
Anonymous
No

''Search data in tables' works very well in Mysql but in postgres there an error
There is an error for field date because they doesn't support % joker char.

ERROR: operator does not exist: timestamp without time zone ~~ unknown
LINE 1: ... "process_transition_action" WHERE ("create_date" LIKE '%mod...
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.

A second error :
ERROR: argument of WHERE must be type boolean, not type integer
LINE 1: ...FROM "account_account_financial_report_type" WHERE 0 LIMIT 1

I think than string search shoudn't search in boolean, date type field

Discussion

  • David BEAL

    David BEAL - 2014-09-14

    I'm the initial author of this bug (in 4.1.0 too)

    Here is a really good way to search a string in the whole postgresql database

    http://stackoverflow.com/questions/5350088/how-to-search-a-specific-value-in-all-tables-postgresql/23036421#23036421

    SELECT ctid FROM %I.%I WHERE cast(%I as text)=%L
    should be replaced by
    SELECT ctid FROM %I.%I WHERE cast(%I as text) ~ %L
    to allow to use regex

    Adminer doesn't allow to import procedure. It's not a required feature because we can use a workaround: insert procedure with pgsql.
    Adminer could call this procedure (change name to 'search_in_whole_db' ?) if it exists in db.

    May be in a plugin ? what are the hook for 'Search data in tables' form ?

    What do you think of this ?

     

    Last edit: David BEAL 2014-09-14
  • Jakub Vrána

    Jakub Vrána - 2018-01-30
    • summary: field date postgres in 'Search data in tables' form --> [PostgreSQL] Field date in 'Search data in tables' form
     
  • Jakub Vrána

    Jakub Vrána - 2018-02-06
    • status: open --> closed-fixed
     
  • Maurits van der Schee

    I see the same error in the "Editor" version of Adminer 4.7.7 on PHP 7.4.3 with PostgreSQL 12.4. Can this be fixed there as well?

     

    Last edit: Maurits van der Schee 2020-10-01
    • Jakub Vrána

      Jakub Vrána - 2021-02-06

      Thanks, fixed.

       

Log in to post a comment.