我尝试了这篇文章中的解决方案,但仍然出现错误。
询问:
SELECT unnest(team)
FROM table_of_teams
WHERE team LIKE '%akg%';
错误:
ERROR: operator does not exist: character varying[] ~~ unknown
LINE 5: WHERE team LIKE '%akg%'
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
表结构:
Table "public.table_of_teams"
Column | Type | Modifiers
--------------------+-----------------------------+-------------------------------------------------
teamid | integer | not null default nextval('team_seq'::regclass)
index | integer |
name | character varying |
grouping | character varying |
hour_of_day | integer[] |
day_of_week | integer[] |
team | character varying[] |