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

Commit1c1dfff

Browse files
committed
make output of function get_pathman_lib_version() more user-friendly
1 parentf0bd367 commit1c1dfff

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎expected/pathman_calamity.out‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ SELECT debug_capture();
1313
SELECT get_pathman_lib_version();
1414
get_pathman_lib_version
1515
-------------------------
16-
10410
16+
1.4.10
1717
(1 row)
1818

1919
set client_min_messages = NOTICE;

‎src/pl_funcs.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1606,5 +1606,9 @@ debug_capture(PG_FUNCTION_ARGS)
16061606
Datum
16071607
get_pathman_lib_version(PG_FUNCTION_ARGS)
16081608
{
1609-
PG_RETURN_CSTRING(psprintf("%x",CURRENT_LIB_VERSION));
1609+
uint8ver_major= (CURRENT_LIB_VERSION&0xFF0000) >>16,
1610+
ver_minor= (CURRENT_LIB_VERSION&0xFF00) >>8,
1611+
ver_patch= (CURRENT_LIB_VERSION&0xFF);
1612+
1613+
PG_RETURN_CSTRING(psprintf("%x.%x.%x",ver_major,ver_minor,ver_patch));
16101614
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp