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

Commitc8e81af

Browse files
committed
Convert contrib/seg's bool-returning SQL functions to V1 call convention.
It appears that we can no longer get away with using V0 call conventionfor bool-returning functions in newer versions of MSVC. The compilerseems to generate code that doesn't clear the higher-order bits of theresult register, causing the bool result Datum to often read as "true"when "false" was intended. This is not very surprising, since thefunction thinks it's returning a bool-width result but fmgr_oldstyleassumes that V0 functions return "char *"; what's surprising is thatthat hack worked for so long on so many platforms.The only functions of this description in core+contrib are in contrib/seg,which we'd intentionally left mostly in V0 style to serve as a warningcanary if V0 call convention breaks. We could imagine hacking thingsso that they're still V0 (we'd have to redeclare the bool-returningfunctions as returning some suitably wide integer type, like size_t,at the C level). But on the whole it seems better to convert 'em to V1.We can still leave the pointer- and int-returning functions in V0 style,so that the test coverage isn't gone entirely.Back-patch to 9.5, since our intention is to support VS2015 in 9.5and later. There's no SQL-level change in the functions' behaviorso back-patching should be safe enough.Discussion: <22094.1461273324@sss.pgh.pa.us>Michael Paquier, adjusted some by me
1 parent9f633b4 commitc8e81af

File tree

1 file changed

+195
-105
lines changed

1 file changed

+195
-105
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp