Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit830f559

Browse files
committed
Issue#61: Fix 32-bit result for array test
1 parent0fdfdd8 commit830f559

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

‎expected/array_1.out

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -851,20 +851,26 @@ SELECT *, i <=> '{51}' from test_array_order WHERE i @> '{23,20}' order by i <=>
851851
Order By: (i <=> '{51}'::smallint[])
852852
(3 rows)
853853

854-
SELECT *, i <=> '{51}' from test_array_order WHERE i @> '{23,20}' order by i <=> '{51}';
855-
i | ?column?
854+
SELECT i,
855+
CASE WHEN distance = 'Infinity' THEN -1
856+
ELSE distance::numeric(18,14)
857+
END distance
858+
FROM
859+
(SELECT *, (i <=> '{51}') AS distance
860+
FROM test_array_order WHERE i @> '{23,20}' ORDER BY i <=> '{51}') t;
861+
i | distance
856862
---------------------+------------------
857863
{20,23,51} | 1.73205080756888
858864
{33,51,20,77,23,65} | 2.44948974278318
859-
{23,76,34,23,2,20} |Infinity
860-
{20,60,45,23,29} |Infinity
861-
{23,89,38,20,40,95} |Infinity
862-
{23,20,72} |Infinity
863-
{73,23,20} |Infinity
864-
{6,97,20,89,23} |Infinity
865-
{20,98,30,23,1,66} |Infinity
866-
{57,23,39,46,50,20} |Infinity
867-
{81,20,26,22,23} |Infinity
868-
{18,23,10,90,15,20} |Infinity
865+
{23,76,34,23,2,20} | -1
866+
{20,60,45,23,29} | -1
867+
{23,89,38,20,40,95} | -1
868+
{23,20,72} | -1
869+
{73,23,20} | -1
870+
{6,97,20,89,23} | -1
871+
{20,98,30,23,1,66} | -1
872+
{57,23,39,46,50,20} | -1
873+
{81,20,26,22,23} | -1
874+
{18,23,10,90,15,20} | -1
869875
(12 rows)
870876

‎src/rumsort.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ TRACE_POSTGRESQL_SORT_START(INT1, INT2, INT3, INT4, INT5)
5757
* Below are copied definitions from src/backend/utils/sort/tuplesort.c.
5858
*/
5959

60+
/* GUC variables */
61+
#ifdefTRACE_SORT
62+
booltrace_sort= false;
63+
#endif
64+
6065
typedefstruct
6166
{
6267
void*tuple;/* the tuple proper */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp