Andreas Gaab <a.g...@scanlab.de> writes: > I tried to order a text-column only by parts of the entries. Therefore I used > regexp_matches(), but unfortunately I am loosing rows.
> SELECT regexp_matches('abc','[0-9]+'), regexp_matches('123','[0-9]+'); > Does not return "{null}, {123}" but no result at all. Yes, because regexp_matches returns a rowset of zero or more results. The fine manual suggests putting it in a sub-select if what you want is a null or a single result: SELECT ... , (SELECT regexp_matches(...)) FROM ... regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql