[PostgreSQL] Field date in 'Search data in tables' form
Database management in a single PHP file
Brought to you by:
jakubvrana
''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
View and moderate all "bugs-and-features Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs and Features"
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
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
Thanks, fixed.