create function refcursor_test2(int) returns boolean as $$
declare
    c1 cursor (param0 integer, param1 integer, param2 integer, param3 integer, param4 integer, param5 integer, param6 integer, param7 integer, param8 integer, param9 integer, param10 integer, param11 integer, param12 integer, param13 integer, param14 integer, param15 integer, param16 integer, param17 integer, param18 integer, param19 integer, param20 integer, param21 integer, param22 integer, param23 integer, param24 integer, param25 integer, param26 integer, param27 integer, param28 integer, param29 integer, param30 integer, param31 integer, param32 integer, param33 integer, param34 integer, param35 integer, param36 integer, param37 integer, param38 integer, param39 integer, param40 integer, param41 integer, param42 integer, param43 integer, param44 integer, param45 integer, param46 integer, param47 integer, param48 integer, param49 integer, param50 integer, param51 integer, param52 integer, param53 integer, param54 integer, param55 integer, param56 integer, param57 integer, param58 integer, param59 integer, param60 integer, param61 integer, param62 integer, param63 integer, param64 integer, param65 integer, param66 integer, param67 integer, param68 integer, param69 integer, param70 integer, param71 integer, param72 integer, param73 integer, param74 integer, param75 integer, param76 integer, param77 integer, param78 integer, param79 integer, param80 integer, param81 integer, param82 integer, param83 integer, param84 integer, param85 integer, param86 integer, param87 integer, param88 integer, param89 integer, param90 integer, param91 integer, param92 integer, param93 integer, param94 integer, param95 integer, param96 integer, param97 integer, param98 integer, param99 integer, param100 integer, param101 integer, param102 integer, param103 integer, param104 integer, param105 integer, param106 integer, param107 integer, param108 integer, param109 integer, param110 integer, param111 integer, param112 integer, param113 integer, param114 integer, param115 integer, param116 integer, param117 integer, param118 integer, param119 integer, param120 integer, param121 integer, param122 integer, param123 integer, param124 integer, param125 integer, param126 integer, param127 integer, param128 integer, param129 integer, param130 integer, param131 integer, param132 integer, param133 integer, param134 integer, param135 integer, param136 integer, param137 integer, param138 integer, param139 integer, param140 integer, param141 integer, param142 integer, param143 integer, param144 integer, param145 integer, param146 integer, param147 integer, param148 integer, param149 integer, param150 integer, param151 integer, param152 integer, param153 integer, param154 integer, param155 integer, param156 integer, param157 integer, param158 integer, param159 integer, param160 integer, param161 integer, param162 integer, param163 integer, param164 integer, param165 integer, param166 integer, param167 integer, param168 integer, param169 integer, param170 integer, param171 integer, param172 integer, param173 integer, param174 integer, param175 integer, param176 integer, param177 integer, param178 integer, param179 integer, param180 integer, param181 integer, param182 integer, param183 integer, param184 integer, param185 integer, param186 integer, param187 integer, param188 integer, param189 integer, param190 integer, param191 integer, param192 integer, param193 integer, param194 integer, param195 integer, param196 integer, param197 integer, param198 integer, param199 integer, param200 integer, param201 integer, param202 integer, param203 integer, param204 integer, param205 integer, param206 integer, param207 integer, param208 integer, param209 integer, param210 integer, param211 integer, param212 integer, param213 integer, param214 integer, param215 integer, param216 integer, param217 integer, param218 integer, param219 integer, param220 integer, param221 integer, param222 integer, param223 integer, param224 integer, param225 integer, param226 integer, param227 integer, param228 integer, param229 integer, param230 integer, param231 integer, param232 integer, param233 integer, param234 integer, param235 integer, param236 integer, param237 integer, param238 integer, param239 integer, param240 integer, param241 integer, param242 integer, param243 integer, param244 integer, param245 integer, param246 integer, param247 integer, param248 integer, param249 integer, param250 integer, param251 integer, param252 integer, param253 integer, param254 integer, param255 integer, param256 integer, param257 integer, param258 integer, param259 integer, param260 integer, param261 integer, param262 integer, param263 integer, param264 integer, param265 integer, param266 integer, param267 integer, param268 integer, param269 integer, param270 integer, param271 integer, param272 integer, param273 integer, param274 integer, param275 integer, param276 integer, param277 integer, param278 integer, param279 integer, param280 integer, param281 integer, param282 integer, param283 integer, param284 integer, param285 integer, param286 integer, param287 integer, param288 integer, param289 integer, param290 integer, param291 integer, param292 integer, param293 integer, param294 integer, param295 integer, param296 integer, param297 integer, param298 integer, param299 integer, param300 integer, param301 integer, param302 integer, param303 integer, param304 integer, param305 integer, param306 integer, param307 integer, param308 integer, param309 integer, param310 integer, param311 integer, param312 integer, param313 integer, param314 integer, param315 integer, param316 integer, param317 integer, param318 integer, param319 integer, param320 integer, param321 integer, param322 integer, param323 integer, param324 integer, param325 integer, param326 integer, param327 integer, param328 integer, param329 integer, param330 integer, param331 integer, param332 integer, param333 integer, param334 integer, param335 integer, param336 integer, param337 integer, param338 integer, param339 integer, param340 integer, param341 integer, param342 integer, param343 integer, param344 integer, param345 integer, param346 integer, param347 integer, param348 integer, param349 integer, param350 integer, param351 integer, param352 integer, param353 integer, param354 integer, param355 integer, param356 integer, param357 integer, param358 integer, param359 integer, param360 integer, param361 integer, param362 integer, param363 integer, param364 integer, param365 integer, param366 integer, param367 integer, param368 integer, param369 integer, param370 integer, param371 integer, param372 integer, param373 integer, param374 integer, param375 integer, param376 integer, param377 integer, param378 integer, param379 integer, param380 integer, param381 integer, param382 integer, param383 integer, param384 integer, param385 integer, param386 integer, param387 integer, param388 integer, param389 integer, param390 integer, param391 integer, param392 integer, param393 integer, param394 integer, param395 integer, param396 integer, param397 integer, param398 integer, param399 integer, param400 integer, param401 integer, param402 integer, param403 integer, param404 integer, param405 integer, param406 integer, param407 integer, param408 integer, param409 integer, param410 integer, param411 integer, param412 integer, param413 integer, param414 integer, param415 integer, param416 integer, param417 integer, param418 integer, param419 integer, param420 integer, param421 integer, param422 integer, param423 integer, param424 integer, param425 integer, param426 integer, param427 integer, param428 integer, param429 integer, param430 integer, param431 integer, param432 integer, param433 integer, param434 integer, param435 integer, param436 integer, param437 integer, param438 integer, param439 integer, param440 integer, param441 integer, param442 integer, param443 integer, param444 integer, param445 integer, param446 integer, param447 integer, param448 integer, param449 integer, param450 integer, param451 integer, param452 integer, param453 integer, param454 integer, param455 integer, param456 integer, param457 integer, param458 integer, param459 integer, param460 integer, param461 integer, param462 integer, param463 integer, param464 integer, param465 integer, param466 integer, param467 integer, param468 integer, param469 integer, param470 integer, param471 integer, param472 integer, param473 integer, param474 integer, param475 integer, param476 integer, param477 integer, param478 integer, param479 integer, param480 integer, param481 integer, param482 integer, param483 integer, param484 integer, param485 integer, param486 integer, param487 integer, param488 integer, param489 integer, param490 integer, param491 integer, param492 integer, param493 integer, param494 integer, param495 integer, param496 integer, param497 integer, param498 integer, param499 integer, param500 integer, param501 integer, param502 integer, param503 integer, param504 integer, param505 integer, param506 integer, param507 integer, param508 integer, param509 integer, param510 integer, param511 integer, param512 integer, param513 integer, param514 integer, param515 integer, param516 integer, param517 integer, param518 integer, param519 integer, param520 integer, param521 integer, param522 integer, param523 integer, param524 integer, param525 integer, param526 integer, param527 integer, param528 integer, param529 integer, param530 integer, param531 integer, param532 integer, param533 integer, param534 integer, param535 integer, param536 integer, param537 integer, param538 integer, param539 integer, param540 integer, param541 integer, param542 integer, param543 integer, param544 integer, param545 integer, param546 integer, param547 integer, param548 integer, param549 integer, param550 integer, param551 integer, param552 integer, param553 integer, param554 integer, param555 integer, param556 integer, param557 integer, param558 integer, param559 integer, param560 integer, param561 integer, param562 integer, param563 integer, param564 integer, param565 integer, param566 integer, param567 integer, param568 integer, param569 integer, param570 integer, param571 integer, param572 integer, param573 integer, param574 integer, param575 integer, param576 integer, param577 integer, param578 integer, param579 integer, param580 integer, param581 integer, param582 integer, param583 integer, param584 integer, param585 integer, param586 integer, param587 integer, param588 integer, param589 integer, param590 integer, param591 integer, param592 integer, param593 integer, param594 integer, param595 integer, param596 integer, param597 integer, param598 integer, param599 integer, param600 integer, param601 integer, param602 integer, param603 integer, param604 integer, param605 integer, param606 integer, param607 integer, param608 integer, param609 integer, param610 integer, param611 integer, param612 integer, param613 integer, param614 integer, param615 integer, param616 integer, param617 integer, param618 integer, param619 integer, param620 integer, param621 integer, param622 integer, param623 integer, param624 integer, param625 integer, param626 integer, param627 integer, param628 integer, param629 integer, param630 integer, param631 integer, param632 integer, param633 integer, param634 integer, param635 integer, param636 integer, param637 integer, param638 integer, param639 integer, param640 integer, param641 integer, param642 integer, param643 integer, param644 integer, param645 integer, param646 integer, param647 integer, param648 integer, param649 integer, param650 integer, param651 integer, param652 integer, param653 integer, param654 integer, param655 integer, param656 integer, param657 integer, param658 integer, param659 integer, param660 integer, param661 integer, param662 integer, param663 integer, param664 integer, param665 integer, param666 integer, param667 integer, param668 integer, param669 integer, param670 integer, param671 integer, param672 integer, param673 integer, param674 integer, param675 integer, param676 integer, param677 integer, param678 integer, param679 integer, param680 integer, param681 integer, param682 integer, param683 integer, param684 integer, param685 integer, param686 integer, param687 integer, param688 integer, param689 integer, param690 integer, param691 integer, param692 integer, param693 integer, param694 integer, param695 integer, param696 integer, param697 integer, param698 integer, param699 integer, param700 integer, param701 integer, param702 integer, param703 integer, param704 integer, param705 integer, param706 integer, param707 integer, param708 integer, param709 integer, param710 integer, param711 integer, param712 integer, param713 integer, param714 integer, param715 integer, param716 integer, param717 integer, param718 integer, param719 integer, param720 integer, param721 integer, param722 integer, param723 integer, param724 integer, param725 integer, param726 integer, param727 integer, param728 integer, param729 integer, param730 integer, param731 integer, param732 integer, param733 integer, param734 integer, param735 integer, param736 integer, param737 integer, param738 integer, param739 integer, param740 integer, param741 integer, param742 integer, param743 integer, param744 integer, param745 integer, param746 integer, param747 integer, param748 integer, param749 integer, param750 integer, param751 integer, param752 integer, param753 integer, param754 integer, param755 integer, param756 integer, param757 integer, param758 integer, param759 integer, param760 integer, param761 integer, param762 integer, param763 integer, param764 integer, param765 integer, param766 integer, param767 integer, param768 integer, param769 integer, param770 integer, param771 integer, param772 integer, param773 integer, param774 integer, param775 integer, param776 integer, param777 integer, param778 integer, param779 integer, param780 integer, param781 integer, param782 integer, param783 integer, param784 integer, param785 integer, param786 integer, param787 integer, param788 integer, param789 integer, param790 integer, param791 integer, param792 integer, param793 integer, param794 integer, param795 integer, param796 integer, param797 integer, param798 integer, param799 integer, param800 integer, param801 integer, param802 integer, param803 integer, param804 integer, param805 integer, param806 integer, param807 integer, param808 integer, param809 integer, param810 integer, param811 integer, param812 integer, param813 integer, param814 integer, param815 integer, param816 integer, param817 integer, param818 integer, param819 integer, param820 integer, param821 integer, param822 integer, param823 integer, param824 integer, param825 integer, param826 integer, param827 integer, param828 integer, param829 integer, param830 integer, param831 integer, param832 integer, param833 integer, param834 integer, param835 integer, param836 integer, param837 integer, param838 integer, param839 integer, param840 integer, param841 integer, param842 integer, param843 integer, param844 integer, param845 integer, param846 integer, param847 integer, param848 integer, param849 integer, param850 integer, param851 integer, param852 integer, param853 integer, param854 integer, param855 integer, param856 integer, param857 integer, param858 integer, param859 integer, param860 integer, param861 integer, param862 integer, param863 integer, param864 integer, param865 integer, param866 integer, param867 integer, param868 integer, param869 integer, param870 integer, param871 integer, param872 integer, param873 integer, param874 integer, param875 integer, param876 integer, param877 integer, param878 integer, param879 integer, param880 integer, param881 integer, param882 integer, param883 integer, param884 integer, param885 integer, param886 integer, param887 integer, param888 integer, param889 integer, param890 integer, param891 integer, param892 integer, param893 integer, param894 integer, param895 integer, param896 integer, param897 integer, param898 integer, param899 integer, param900 integer, param901 integer, param902 integer, param903 integer, param904 integer, param905 integer, param906 integer, param907 integer, param908 integer, param909 integer, param910 integer, param911 integer, param912 integer, param913 integer, param914 integer, param915 integer, param916 integer, param917 integer, param918 integer, param919 integer, param920 integer, param921 integer, param922 integer, param923 integer, param924 integer, param925 integer, param926 integer, param927 integer, param928 integer, param929 integer, param930 integer, param931 integer, param932 integer, param933 integer, param934 integer, param935 integer, param936 integer, param937 integer, param938 integer, param939 integer, param940 integer, param941 integer, param942 integer, param943 integer, param944 integer, param945 integer, param946 integer, param947 integer, param948 integer, param949 integer, param950 integer, param951 integer, param952 integer, param953 integer, param954 integer, param955 integer, param956 integer, param957 integer, param958 integer, param959 integer, param960 integer, param961 integer, param962 integer, param963 integer, param964 integer, param965 integer, param966 integer, param967 integer, param968 integer, param969 integer, param970 integer, param971 integer, param972 integer, param973 integer, param974 integer, param975 integer, param976 integer, param977 integer, param978 integer, param979 integer, param980 integer, param981 integer, param982 integer, param983 integer, param984 integer, param985 integer, param986 integer, param987 integer, param988 integer, param989 integer, param990 integer, param991 integer, param992 integer, param993 integer, param994 integer, param995 integer, param996 integer, param997 integer, param998 integer, param999 integer, param1000 integer, param1001 integer, param1002 integer, param1003 integer, param1004 integer, param1005 integer, param1006 integer, param1007 integer, param1008 integer, param1009 integer, param1010 integer, param1011 integer, param1012 integer, param1013 integer, param1014 integer, param1015 integer, param1016 integer, param1017 integer, param1018 integer, param1019 integer, param1020 integer, param1021 integer, param1022 integer, param1023 integer, param1024 integer, param1025 integer, param1026 integer, param1027 integer, param1028 integer, param1029 integer, param1030 integer, param1031 integer, param1032 integer, param1033 integer, param1034 integer, param1035 integer, param1036 integer, param1037 integer, param1038 integer, param1039 integer, param1040 integer, param1041 integer, param1042 integer, param1043 integer, param1044 integer, param1045 integer, param1046 integer, param1047 integer, param1048 integer, param1049 integer, param1050 integer, param1051 integer, param1052 integer, param1053 integer, param1054 integer, param1055 integer, param1056 integer, param1057 integer, param1058 integer, param1059 integer, param1060 integer, param1061 integer, param1062 integer, param1063 integer, param1064 integer, param1065 integer, param1066 integer, param1067 integer, param1068 integer, param1069 integer, param1070 integer, param1071 integer, param1072 integer, param1073 integer, param1074 integer, param1075 integer, param1076 integer, param1077 integer, param1078 integer, param1079 integer, param1080 integer, param1081 integer, param1082 integer, param1083 integer, param1084 integer, param1085 integer, param1086 integer, param1087 integer, param1088 integer, param1089 integer, param1090 integer, param1091 integer, param1092 integer, param1093 integer, param1094 integer, param1095 integer, param1096 integer, param1097 integer, param1098 integer, param1099 integer, param1100 integer, param1101 integer, param1102 integer, param1103 integer, param1104 integer, param1105 integer, param1106 integer, param1107 integer, param1108 integer, param1109 integer, param1110 integer, param1111 integer, param1112 integer, param1113 integer, param1114 integer, param1115 integer, param1116 integer, param1117 integer, param1118 integer, param1119 integer, param1120 integer, param1121 integer, param1122 integer, param1123 integer, param1124 integer, param1125 integer, param1126 integer, param1127 integer, param1128 integer, param1129 integer, param1130 integer, param1131 integer, param1132 integer, param1133 integer, param1134 integer, param1135 integer, param1136 integer, param1137 integer, param1138 integer, param1139 integer, param1140 integer, param1141 integer, param1142 integer, param1143 integer, param1144 integer, param1145 integer, param1146 integer, param1147 integer, param1148 integer, param1149 integer, param1150 integer, param1151 integer, param1152 integer, param1153 integer, param1154 integer, param1155 integer, param1156 integer, param1157 integer, param1158 integer, param1159 integer, param1160 integer, param1161 integer, param1162 integer, param1163 integer, param1164 integer, param1165 integer, param1166 integer, param1167 integer, param1168 integer, param1169 integer, param1170 integer, param1171 integer, param1172 integer, param1173 integer, param1174 integer, param1175 integer, param1176 integer, param1177 integer, param1178 integer, param1179 integer, param1180 integer, param1181 integer, param1182 integer, param1183 integer, param1184 integer, param1185 integer, param1186 integer, param1187 integer, param1188 integer, param1189 integer, param1190 integer, param1191 integer, param1192 integer, param1193 integer, param1194 integer, param1195 integer, param1196 integer, param1197 integer, param1198 integer, param1199 integer) for select * from rc_test where a > param1;
    nonsense record;
begin
    open c1($1);
    fetch c1 into nonsense;
    close c1;
    if found then
        return true;
    else
        return false;
    end if;
end
$$ language 'plpgsql';
