#325 field date postgres in 'Search data in tables' form

3.7.0
open
Jakub Vrána
PostgreSQL (25)
5
2014-09-14
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