Postgres: Table with "text[]" typed column

[expired user #8549]'s profile image [expired user #8549] posted 9 years ago in General Permalink
I have a table with a column created like this:
response text[] DEFAULT '{}'::text[],


Trying to view the "Data" tab for this table fails with error:
ERROR: function substr(text[], integer, integer) does not exist...

Also after selecting some rows from this table with sql, grid editing for this column fails with error:
Could not find table or view public.. Please refresh database tree.
[expired user #8895]'s profile image [expired user #8895] posted 9 years ago Permalink
Same with inet datatype.
Like in a radius db:
SELECT  "radacctid",  "acctsessionid",  "acctuniqueid",  "username",  "groupname",  "realm",  SUBSTR("nasipaddress", 1, 256),  "nasportid",  "nasporttype",  "acctstarttime",  "acctstoptime",  "acctsessiontime",  "acctauthentic",  "connectinfo_start",  "connectinfo_stop",  "acctinputoctets",  "acctoutputoctets",  "calledstationid",  "callingstationid",  "acctterminatecause",  "servicetype",  "xascendsessionsvrkey",  "framedprotocol",  SUBSTR("framedipaddress", 1, 256),  "acctstartdelay",  "acctstopdelay" FROM "public"."radacct" LIMIT 1000;
/* ERROR:  function substr(inet, integer, integer) does not exist
LINE 1: ...tuniqueid",  "username",  "groupname",  "realm",  SUBSTR("na...
^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts. */


Hint use
SUBSTR("`inet or whatever type column`"::varchar, 1, 256)

Please login to leave a reply, or register at first.