From: | spulatkan <seckinpulatkan(at)hotmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Using regexp_matches in the WHERE clause |
Date: | 2013-08-29 13:12:44 |
Message-ID: | 1377781964520-5768923.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
I noticed that regexp_matches already returns the rows which matches the
regular expression
now when I make a full table select query
but if I make a search with regexp_matches, it only returns rows that
matches regular expression
on pgadmin the column type is shown as text[] thus I also do not understand
why array_length on where condition does not work for this.
But maybe as it was pointed out, the return type is setof text[], that the
result could have been like this (one row of data may result in multiple
rows)
If you have a regular expression that may end in one or more elements in the
text[] then you may use inner query
ps: last query is pointless as it will return 2 elements for each row (that
matches the regular expression), but there may be a regular expression that
may return one or more elements for each row
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Using-regexp-matches-in-the-WHERE-clause-tp5733684p5768923.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Charles Sheridan | 2013-08-29 13:18:03 | Re: CTAGS for PL/pgSQL ? |
Previous Message | Luca Ferrari | 2013-08-29 12:57:33 | Re: CTAGS for PL/pgSQL ? |