From: spulatkan <seckinpulatkan@hotmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Using regexp_matches in the WHERE clause
Date: Thu, 29 Aug 2013 06:12:44 -0700 (PDT)
Message-ID: <1377781964520-5768923.post@n5.nabble.com> (raw)
In-Reply-To: <E72D307E-D276-4FF6-8E05-8434C6370AB8@yahoo.com>
References: <k8vmbm$1fg$1@ger.gmane.org>
<E72D307E-D276-4FF6-8E05-8434C6370AB8@yahoo.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.h...
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: seckinpulatkan@hotmail.com
Subject: Re: Using regexp_matches in the WHERE clause
In-Reply-To: <1377781964520-5768923.post@n5.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox