Re: Document that char () ignores spaces only in non-patterncomparisons - Mailing list pgsql-docs

From Kevin Grittner
Subject Re: Document that char () ignores spaces only in non-patterncomparisons
Date
Msg-id 4D760F40020000250003B610@gw.wicourts.gov
Whole thread Raw
Responses Re: Document that char () ignores spaces only in non-patterncomparisons  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Document that char () ignores spaces only in non-patterncomparisons  (Bruce Momjian <bruce@momjian.us>)
List pgsql-docs
Bruce Momjian <bruce@momjian.us> wrote:

> A private email I received indicated that our documentation about
> ignoring trailing spaces in CHAR() comparisons was slightly
> inaccurate.  I have update our docs to indicate it is only
> non-pattern comparisons that ignore spaces with CHAR().  Applied
> doc patch attached.

This language:

| disregarded when non-pattern comparing two values

seems quite awkward.

Isn't it a stretch to consider pattern-matching predicates to be
compares, anyway?  It seems like it would be better to distinguish
between comparisons, where the trailing spaces are ignored, and
other predicates such as pattern matching, where trailing spaces are
not ignored.

-Kevin

pgsql-docs by date:

Previous
From: Bruce Momjian
Date:
Subject: Document that char() ignores spaces only in non-pattern comparisons
Next
From: Tom Lane
Date:
Subject: Re: Document that char () ignores spaces only in non-patterncomparisons