1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

varstr_cmp and any comparison function that piggybacks on it can return

any negative or positive number, not just -1 or 1. Fix comment on
varstr_cmp and citext test case accordingly.

As pointed out by Zdenek Kotala, and buildfarm member gothic moth.
This commit is contained in:
Heikki Linnakangas
2009-04-23 07:19:09 +00:00
parent 8d4f2ecd41
commit 283939a321
4 changed files with 12 additions and 11 deletions

View File

@ -213,10 +213,10 @@ SELECT citext_cmp('AARDVARK'::citext, 'AARDVARK'::citext) AS zero;
0
(1 row)
SELECT citext_cmp('B'::citext, 'a'::citext) AS one;
one
-----
1
SELECT citext_cmp('B'::citext, 'a'::citext) > 0 AS true;
true
------
t
(1 row)
-- Do some tests using a table and index.

View File

@ -213,10 +213,10 @@ SELECT citext_cmp('AARDVARK'::citext, 'AARDVARK'::citext) AS zero;
0
(1 row)
SELECT citext_cmp('B'::citext, 'a'::citext) AS one;
one
-----
1
SELECT citext_cmp('B'::citext, 'a'::citext) > 0 AS true;
true
------
t
(1 row)
-- Do some tests using a table and index.

View File

@ -90,7 +90,7 @@ SELECT 'aardvark'::citext = 'aardVark'::citext AS t;
SELECT citext_cmp('aardvark'::citext, 'aardvark'::citext) AS zero;
SELECT citext_cmp('aardvark'::citext, 'aardVark'::citext) AS zero;
SELECT citext_cmp('AARDVARK'::citext, 'AARDVARK'::citext) AS zero;
SELECT citext_cmp('B'::citext, 'a'::citext) AS one;
SELECT citext_cmp('B'::citext, 'a'::citext) > 0 AS true;
-- Do some tests using a table and index.